JDK-6400872 : REGRESSION: Java Compiler cannot find jar files referenced by other
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0,5.0u7,6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS:
    linux,solaris_2.5.1,solaris_10,windows_xp linux,solaris_2.5.1,solaris_10,windows_xp
  • CPU: x86,sparc
  • Submitted: 2006-03-20
  • Updated: 2010-05-08
  • Resolved: 2006-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b85Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REGRESSION :
I have tried the exact same compile command on Java 1.4, Java 1.5, and Java 1.6 beta. Compiling with 1.4 and 1.5 is fine. When I execute the command against 1.6 compiler I get:

---------------------------------------------------------------------------------------------------------------------------------

error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\commons-logging-api-1.0.2.jar; The system cannot find the path specified
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\commons-collections-api-1.0.2.jar; The system cannot find the path specified
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\commons-fileupload-api-1.0.2.jar; The system cannot find the path specified

---------------------------------------------------------------------------------------------------------------------------------

I recieve many of these messages, and some are duplicated. The jar files in question are in the lib directory and as stated earlier are found by 1.4 and 1.5. Looking at the MANIFEST of one of my jars, it references others using './jarname.jar', and even referenced it's self. I removed the self reference and the './' from all the other jar files but still did not work. Several of the jars point to each other in the MANAFESTS Class-Path element.

REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
Multiple jar files, each with a Class-Path in the MANIFEST.MF. The jar files point to each other, referencing each other as ./jarname.jar. Use these jar files in the -classpath of the compiler.

RELEASE LAST WORKED:
5.0 Update 4

RELEASE TEST FAILS:
mustang-beta

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected the compile to be successful as it was using both 1.4 and 1.5
ACTUAL -
C:\WORKSPACE>"%JAVA_HOME%\bin\javac" -classpath lib/core.jar;lib/beans.jar;C:\jboss\server\default\lib\jboss-j2ee.jar -d
 /bin/classes -sourcepath /src src/XMLImport.java
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\beans.jar; The system cannot find the path specified
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\apps.jar; The system cannot find the path specified
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\inbound.jar; The system cannot find the path specified
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\commons-collections-2.1.jar; Filename too long
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\commons-logging-api-1.0.2.jar; Filename too long
error: error reading lib\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
\commons-fileupload-1.0.jar; Filename too long
 ...

Comments
EVALUATION The check whether a file was already in the path did not use the canonical path of the file. The fix is to keep a cache of the canonical values of the entries on the path, and to check the canonical value of any new entries against that list.
02-05-2006

EVALUATION Reproduced test case on Linux
02-05-2006