Help with compiling java

REDDY GOPI-QMDV68 gopi.reddy@motorola.com
Tue Apr 15 19:26:00 GMT 2008


Just compiled and installed gcc-4.3.0. Getting
java.lang.NoClassDefFoundError while compiling a test program. The class
that's not found (org.eclipse.jdt.internal.compiler.batch.GCCMain) is in
ecj.jar listed in the bootclasspath. Help is greatly appreciated.
 
Thanks
Gopi
 
# gcj -v Test.java
Using built-in specs.
Reading specs from /root/gcc-4.3.0-install/usr/local/lib/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3.0/configure
Thread model: posix
gcc version 4.3.0 (GCC)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-v'
'-fbootclasspath=/root/gcc-4.3.0/ecj.jar:/root/gcc-4.3.0-install/usr/loc
al/bin/../lib/gcc/../../share/java/libgcj-4.3.0.jar' '-g1'
'-shared-libgcc' '-mtune=generic'
 
/root/gcc-4.3.0-install/usr/local/bin/../libexec/gcc/i686-pc-linux-gnu/4
.3.0/ecj1 Test.java -g1
-fbootclasspath=/root/gcc-4.3.0/ecj.jar:/root/gcc-4.3.0-install/usr/loca
l/bin/../lib/gcc/../../share/java/libgcj-4.3.0.jar -g1 -fsource=1.5
-ftarget=1.5 -fzip-dependency /tmp/cczzFftb.zip -fzip-target
/tmp/cc8J4uMc.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
org.eclipse.jdt.internal.compiler.batch.GCCMain
   at gnu.java.lang.MainThread.run(MainThread.java:102)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.jdt.internal.compiler.batch.GCCMain not found in
gnu.gcj.runtime.SystemClassLoader{urls=[],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(URLClassLoader.java:529)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at gnu.java.lang.MainThread.run(libgcj.so.9)



More information about the Gcc-help mailing list