Community
Participate
Working Groups
Eclipse's Java compiler should include the value of the "java.endorsed.dirs" system property on its bootclasspath by default. This value should be overridable on the command line with the -endorseddirs option.
According to what is in this page http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html, not any packages can be retrieved from the endorsed library directories. Is this what you want? The contents of the endorsed library directories should then be inserted before the contents of the bootclasspath. Is this what you expect?
The documentation I've found on javac's handling of endorsed directories is from the 1.5 -help output: -endorseddirs <dirs> Override location of endorsed standards path and the manpage: http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html -Djava.endorsed.dirs=directories Override the location of endorsed standards path. These options lead me to believe that endorsed directories should be handled in a similar way to extension directories. I don't know where in the bootclasspath order endorsed jars should be included though. As for a jar's "endorsed" status, I would prefer that ecj not check that. I'd rather it just put any jar it finds in the endorsed directory on the bootclasspath.
Darin - are you supporting endorsed dirs on JRE container ? If so, what spec are you using ?
Yes, we support endorderd dirs on the JRE container. When a JRE is added to the workspace, we execute the JRE to retrieve its java.endorsed.dirs attribute and these locations to the JRE container.
So you simply retrieve the jars within this folder? Do you actually filter the classes from the jars to retrieve only some specific packages?
We use the jars, we do not retrieve specific packages.
+1 for 3.2RC2
Created attachment 38712 [details] Proposed fix Make endorsed dirs similar to extdirs and prepend endorsed jars in the bootclasspath.
Created attachment 38713 [details] Regression tests updated BatchCompiler test12 needs to be updated.
Fixed and released in HEAD. Please try it and let me know if this is the expected behavior.
In case this property is not set, a string is left in the classpath and it is causing an ArrayStoreException. Fix is trivial. Fixed and released in HEAD.
*** Bug 137597 has been marked as a duplicate of this bug. ***
Verified with I20060427-1600 for 3.2RC2