Bug 110826 - [compiler] Batch compiler doesn't work when set on the bootclasspath
Summary: [compiler] Batch compiler doesn't work when set on the bootclasspath
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-27 12:08 EDT by Olivier Thomann CLA
Modified: 2005-09-27 15:33 EDT (History)
0 users

See Also:


Attachments
Proposed fix (1.00 KB, patch)
2005-09-27 12:19 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-09-27 12:08:39 EDT
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;
}
Comment 1 Olivier Thomann CLA 2005-09-27 12:19:27 EDT
Created attachment 27563 [details]
Proposed fix
Comment 2 Philipe Mulet CLA 2005-09-27 12:34:32 EDT
+1 for 3.1.1
Comment 3 Olivier Thomann CLA 2005-09-27 13:10:15 EDT
Fixed and released in 3.1.1 maintenance stream.
No specific regression tests. Try to run the command line in comment 0.
Comment 4 Olivier Thomann CLA 2005-09-27 15:33:26 EDT
Verified in  M20050923-1430 + JDT/Core 3.1.1RC3 candidate