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

Tom Tromey tromey@cygnus.com
Fri Aug 6 00:56:00 GMT 1999


>>>>> "Kresten" == Kresten Krab Thorup <krab@gnu.org> writes:

Kresten> I suggest, that for the compiler, it should have the default
Kresten> compiled in (as it has now), and allow arguments to override
Kresten> the default (as it does now), but not use the "CLASSPATH"
Kresten> environment variable -- perhaps we could use "GCJ_CLASSPATH"
Kresten> instead.

When using "gcj -C" you probably do want to read CLASSPATH, though.
One goal is to have "gcj -C" be a replacement for "javac".

Kresten> For make files, it is most robust to use an explicit
Kresten> -classpath option to the compiler.  For individual command
Kresten> line usages, it would be meaningful to add
Kresten> `--classpath-prepend', or `-cp'.

We also do have various options to control this sort of thing.
For instance, we have -I.

Kresten> In general I don't like to use environment variables: a small
Kresten> script or a shell alias that invokes your tool with the
Kresten> correct and explicit command line options is much more
Kresten> stable, and easy to do too.

I agree, but we also want compatibility with javac.

It might make sense to ignore the environment when not using -C.  I
don't really have an opinion on that, though I do note that CLASSPATH
has caused more than one bug report.  This is some evidence against,
in my book.

Tom


More information about the Java mailing list