Strange behavior of javac

Max (Weijun) Wang Weijun.Wang at Sun.COM
Wed Sep 24 04:07:32 PDT 2008


Hi All

I just built a bsd-port openjdk, the last of the following commands  
fails.

cd /tmp
echo 'package x; public class A {}' > A.java
javac -d $JM/classes A.java
echo 'package x; public class B extends A {}' > B.java
javac -d $JM/classes B.java

   B.java:1: cannot find symbol
   symbol: class A
   package x; public class B extends A {}
                                   ^
   1 error

(Here $JM is the newly built jdk, javac is the compiler in $JM/bin)

As I understand, the second javac call should be able to load class A  
from $JM/classes/x/A.class. This is true on my Linux box with the  
latest openjdk build.

Any ideas?

Thanks
Max




More information about the compiler-dev mailing list