Java compilation with gcj...

Mike Harrold mharrold@cas.org
Thu Jan 18 13:41:00 GMT 2001


Hi,

I get the following error when trying to use gcj to compile a class file:

[miko@mah21hpc2 src]$ gcj -v Test.java
Reading specs from /usr/local/gcc-2.95.2/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
Reading specs from libgcj.spec
gcc version 2.95.2 19991024 (release)
 /usr/local/gcc-2.95.2/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/jc1 Test.java -quiet -g1 -version -o /tmp/ccpv7GJN.s
GNU Java version 2.95.2 19991024 (release) (i586-pc-linux-gnu) compiled by GNU C version 2.95.2 19991024 (release).
Test.java:0: Can't find default package `java.lang'. Check the CLASSPATH environment variable and the access to the archives.
1 error

What should I be setting CLASSPATH to? Does gcj come with it's own java.lang (etc),
or should I be pointing at something else?

Thanks,

/Mike


More information about the Gcc-help mailing list