-
Bug
-
Resolution: Fixed
-
P3
-
5.0u10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2159002 | 6-pool | Unassigned | P3 | Closed | Won't Fix |
The first problem is that javac tool running on Windows doesn't understand a relative path within
manifest section, e.g:
Manifest-Version: 1.0
Class-Path: ../A.jar
This ends up with such kind of error:
javac -cp jars/A.jar Main.java
error: error reading jars\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\
.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..
\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\.
.\.\sub\B.zip; The system cannot find the path specified
1 error
The second problem is that javac doesn't preserve Class-Path manifest entries for JAR files
in the extensions directories. (the JAR files need to be in different directories to demonstrate
this, because all JAR files in an extensions directory are searched anyway).
This bug could be seen on all platforms.
Error looks like this:
javac -extdirs jars -cp None Main.java
Main.java:3: cannot find symbol
symbol : variable B
location: class Main
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
Main.java:3: operator + cannot be applied to int,B.f
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
Main.java:3: exit(int) in java.lang.System cannot be applied to (<nulltype>)
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
3 errors
This bugs are illustrated by the attached testcase. Run it by executig:
$ sh Class-Path2.sh
manifest section, e.g:
Manifest-Version: 1.0
Class-Path: ../A.jar
This ends up with such kind of error:
javac -cp jars/A.jar Main.java
error: error reading jars\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\
.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..
\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\..\.\sub\.
.\.\sub\B.zip; The system cannot find the path specified
1 error
The second problem is that javac doesn't preserve Class-Path manifest entries for JAR files
in the extensions directories. (the JAR files need to be in different directories to demonstrate
this, because all JAR files in an extensions directory are searched anyway).
This bug could be seen on all platforms.
Error looks like this:
javac -extdirs jars -cp None Main.java
Main.java:3: cannot find symbol
symbol : variable B
location: class Main
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
Main.java:3: operator + cannot be applied to int,B.f
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
Main.java:3: exit(int) in java.lang.System cannot be applied to (<nulltype>)
public static void main(String []a) { System.exit(A.f() + B.f()); }
^
3 errors
This bugs are illustrated by the attached testcase. Run it by executig:
$ sh Class-Path2.sh
- backported by
-
JDK-2159002 javac incorrectly handles relative paths in manifest classpath
-
- Closed
-
- relates to
-
JDK-6400872 REGRESSION: Java Compiler cannot find jar files referenced by other
-
- Closed
-
-
JDK-6456960 java 1.5.0_07compiler reports JVM out of memory error when MANIFEST classpath el
-
- Closed
-
-
JDK-4212732 javac seems to ignore classpath manifest entries in jar files
-
- Resolved
-