Community
Participate
Working Groups
Why does the Ant adapter code for the Eclipse Java compiler set the includejavaRuntime to true when the bootclasspath is defined to be empty? (even if that attribute is explicitly set false)? How can I invoke the compiler with an empty bootclasspath? This is require for Apache Harmony where all the types are being compiled from source, and there are no class files required. ref: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java?rev=1.65&content-type=text/vnd.viewcvs-markup
I'll look at this. When do you need a fix for this?
We have a workaround by setting a bogus bootclasspath, so no mad rush.
The fix would be to remove the this.includeJavaRuntime= true when no bootclasspath has been specified. But we also need to solve the case where the batch compiler is trying to retrieve the libraries from the VM that is running the batch compiler when no bootclasspath has been specified. We should set an empty bootclasspath without reporting an incorrect classpath. -bootclasspath "" would mean no libraries. So if java.lang.Object is not part of the compilation units to compile, the compilation will fail.
Created attachment 54605 [details] Proposed fix I'll do more testing tomorrow.
Created attachment 54648 [details] New patch With this patch, bootclasspath="" in the javac task would mean that there is no bootclasspath and the batch compiler won't try to retrieve it from the underlying VM. Would this fix your issue?
+1 for 3.2.2 (if proven to be required)
Do you need a fix for 3.2.2 or 3.3. only?
Released for 3.3M4. Tim, let us know if this is required for 3.2.2.
Fix in 3.3 stream only is fine -- thanks.
Verified on I20061211-0010. Setting <bootclasspath/> within the <javac ...> task produced: ... [javac] Compiling 1 source file to C:\Harmony\build\classes [javac] Using JDT compiler [javac] Compilation arguments: [javac] '-noExit' [javac] '-bootclasspath' [javac] '' [javac] '-classpath' [javac] 'C:\Harmony\build\classes; ... Which is what I expected. Thanks.
Thanks for the assessment