Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6485027
Votes 0
Synopsis javac incorrectly handles relative paths in manifest classpath
Category java:compiler
Reported Against
Release Fixed
State 3-Accepted, bug
Priority: 3-Medium
Related Bugs 4212732 , 6400872 , 6456960
Submit Date 23-OCT-2006
Description
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  customer 
   customer   : 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
Posted Date : 2006-10-23 17:10:57.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang