Community
Participate
Working Groups
When compiling code that needs to report error messages, the batch compiler blows up with this error: Exception in thread "main" java.lang.NoClassDefFoundError at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:399) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:348) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:2728) at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1166) at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1071) This comes from the Messages class that doesn't support its field initialization when loaded from the system class loader (this is the consequence of having the compiler classes on the bootclasspath). To reproduce, use the following command line: java -Xbootclasspath/a:org.eclipse.jdt.core_3.1.0.jar org.eclipse.jdt.internal.compiler.batch.Main X.java When X is: public class X { ZORK f; }
Created attachment 27563 [details] Proposed fix
+1 for 3.1.1
Fixed and released in 3.1.1 maintenance stream. No specific regression tests. Try to run the command line in comment 0.
Verified in M20050923-1430 + JDT/Core 3.1.1RC3 candidate