The CLASSPATH Issue [Was: java in gcc-2.95 release on Linux - not so good]

Jeff Sturm jsturm@sigma6.com
Fri Aug 6 08:31:00 GMT 1999


Kresten Krab Thorup wrote:
> This CLASSPATH problem has also fooled me a couple of times, and I am
> beginning to think that it would be a good idea to *not* have gcj use
> that environment variable *at all*.  I think many users will be having
> this problem.  Since gcj *needs* to work against something which is
> exactly the right one, it seems much too fragile to share this
> variable with other random java implementations.

It suprises me how often this has come up.  I don't think the issue is
specific to gcj.  It is nearly always a mistake to include
lib/classes.zip in CLASSPATH, since classes.zip (or libgcj.zip) is
*always* specific to one implementation.  It also isn't necessary, since
the JDK automatically appends its own classes to the CLASSPATH setting
from the environment.

I don't think gcj is broken in this regard.  Maybe it would be
worthwhile to add some sanity checks and print a warning message, if a
foreign java.lang.Object is found in the CLASSPATH for example.


-- 
Jeff Sturm
jsturm@sigma6.com


More information about the Java mailing list