[66]
From Markus.Kieninger@jSoft.de Fri Oct 29 09:59:05 1999
Received: from localhost (localhost [127.0.0.1])
by www10.software.ibm.com (8.9.3/8.9.3) with ESMTP id JAA09869
for <jikes-bugs@www10.software.ibm.com>; Fri, 29 Oct 1999 09:59:05 -0500
Date: Fri, 29 Oct 1999 09:59:05 -0500
From: Markus.Kieninger@jSoft.de
Message-Id: <199910291459.JAA09869@www10.software.ibm.com>
To: jikes-bugs@www10.software.ibm.com
Subject: import statement and package names
Full_Name: Markus Kieninger
Version: 1.06
OS: linux
Submission from: (NULL) (192.76.144.30)
Scenario:
I have got the following 3 Java Classes:
-------------------------------------
package test;
public class Test {};
-------------------------------------
package de.jsoft.test2;
public class Test2 {};
---------------------------------------
package de.jsoft.test1;
import javax.ejb.EJBHome;
import test.Test;
import de.jsoft.test2.Test2;
public class Test1 {};
---------------------------------------
Now I compile them using the following commandline:
jikes -classpath /opt/jdk/lib/classes/zip:./jars/j2ee.jar:./classes
-d ./classes ./src/test/Test.java
-> OK
jikes -classpath /opt/jdk/lib/classes/zip:./jars/j2ee.jar:./classes
-d ./classes ./src/de/jsoft/test2/Test2.java
-> OK
jikes -classpath /opt/jdk/lib/classes/zip:./jars/j2ee.jar:./classes
-d ./classes ./src/de/jsoft/test1/Test1.java
Error: Type de$jsoft was not found
Error: Type de$jsoft$test2 was not found
Error: Type de$jsoft$test2$Test2 was not found
When I compile the same files using the javac there are no errors.
Now I extracted the j2ee.jar and found a Class "de.class" at the toplevel
of the jar. This class causes the error with jikes.
I didn't find anything in the Java language reference that it is not allowed
to have a class and a subdirectory (which is then a part of a packagename)
with the same name in one sourcedirectory.
If this is true there is a bug in jikes. Otherwise if this is not allowed
there is a bug in javac. Can anybody help me with this problem ?
Markus Kieninger
[66.reply]
From: David Shields <jikes-bugs@www10.software.ibm.com>
To: Markus.Kieninger@jSoft.de
Subject: Re: import statement and package names (PR#66)
Date: Tue Nov 16 19:27:15 1999
Could you please try with our latest, v1.10? There were some recent changes
related to the use of -d.
thanks,
dave
[66.followup]
From Markus.Kieninger@jSoft.de Wed Jan 12 19:42:16 2000
Received: from elch.de.uu.net (elch.de.uu.net [192.76.144.55])
by OSS.Software.IBM.Com (8.9.3/8.9.3) with ESMTP id TAA26831
for <jikes-bugs@www10.software.ibm.com>; Wed, 12 Jan 2000 19:42:15 -0600
Received: from jSoft.de (pec-2-145.tnt2.s2.uunet.de [149.225.2.145])
by elch.de.uu.net (5.5.5/5.5.5) with ESMTP id DAA13156;
Thu, 13 Jan 2000 03:11:41 +0100 (MET)
Message-ID: <387D3467.E3551887@jSoft.de>
Date: Thu, 13 Jan 2000 03:11:51 +0100
From: Markus Kieninger <Markus.Kieninger@jSoft.de>
Organization: jSoft Softwareentwicklungs GmbH
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: David Shields <jikes-bugs@www10.software.ibm.com>
Subject: Re: import statement and package names (PR#66)
References: <199911170127.TAA08621@www10.software.ibm.com>
Hi !
The problem was definitely the structure of the j2ee.jar (Beta).
The new final j2ee.jar now works perfect and I can use jikes again.
(see SUN-BUG-Report #4292051)
The jikes compiler checks the class-names
and packages correctly, whereas the sun javac compiler reports
no errors in this special case. So this is an error in the javac
compiler.
As reported in PR#71 these things (package naming, and so on)
are discribed in detail on the following website:
(http://java.sun.com/docs/books/jls/html/7.doc.html)
David Shields wrote:
>
> Could you please try with our latest, v1.10? There were some recent changes
> related to the use of -d.
>
> thanks,
> dave
--
---------------------------------------------------------------------
jSoft Softwareentwicklungs GmbH Tel.: +49 7364 921953
Markus Kieninger (Dipl.-Inf.) Fax : +49 7364 921952
Bahnhofstrasse 7 Web : www.jsoft.de
73447 Oberkochen
---------------------------------------------------------------------
[144]
From martin.dengler@csfb.com Thu Dec 30 06:09:12 1999
Received: from localhost (localhost [127.0.0.1])
by OSS.Software.IBM.Com (8.9.3/8.9.3) with ESMTP id GAA24856
for <jikes-bugs@www10.software.ibm.com>; Thu, 30 Dec 1999 06:09:12 -0600
Date: Thu, 30 Dec 1999 06:09:12 -0600
From: martin.dengler@csfb.com
Message-Id: <199912301209.GAA24856@OSS.Software.IBM.Com>
To: jikes-bugs@www10.software.ibm.com
Subject: jikes 1.10 package compilation issues
Full_Name: Martin Dengler
Version: 1.10
OS: Solaris 2.5.1
Submission from: (NULL) (195.153.222.65)
Hi,
Below is an issue for us using jikes 1.10 and 1.06 on Solaris 2.5.1 compiling
with
JDK 1.1.7_08 libraries:
It seems that if the -d option is not specified or a destination package
directory
does not exists, jikes will complain about a missing package when compiling a
class
in the supposedly missing package. See below code snippet and usage pattern.
------code snippet: a.java
package Y;
public class a{}
------end code snippet
------problem command snippet
> cat /tmp/a.java
package Y;
public class a{}
> pwd
/
> /app/as/tools/jikes/jikes /tmp/a.java
Found 1 semantic error compiling "/tmp/a.java":
1. package Y;
^
*** Error: Could not find package named:
/sw/eval/java/jdk1.1.7_08/java/lib/classes.zip(Y)
> /app/as/tools/jikes/jikes -d . /tmp/a.java
Found 1 semantic error compiling "/tmp/a.java":
3. public class a{}
<-------------->
*** Error: Unable to write file "Y/a.class".
------end problem command snippet
Note that 1) without the -d option the package was reported as not found; my
assumption here is that the declaration of a package within a source file is
all
that is needed to determine that a given package exists; and 2) with the -d
option
the file is compiled (just can't be written), indicating the "could not find
package" error is not triggered.
The questions that I have are: 1) is my assumption under 1) in the previous
paragraph wrong; and 2) why does the -d option mitigate the "could not find
package"
error?
FYI, if the java file is in the current directory and "." is in the
CLASSPATH, the above
error does not get reported. Note however that above we are not compiling from
the
same directory as the java file and "." is not in the CLASSPATH.
Chrs,
Martin Dengler (martin.dengler@csfb.com)
[144.notes from cabbey]
new_package bug, again
Hmm, I'm leaving this open, but tying it to a related bug on package vs. directory layout.