FW: CreateSymbols / ct.sym issue

Joseph Darcy joe.darcy at oracle.com
Wed Feb 20 20:03:35 PST 2013


Hello,

On 2/20/2013 5:55 AM, Salter, Thomas A wrote:
> I made a change to a private class in java.lang so that it depends on a class in an external jar file.  I have no problem compiling or executing this, but the build fails when trying to make ct.sym.
>
> The specific change I made was to have java.lang.ProcessImpl inherit from "MyAbstractProcess", which in turn inherits from java.lang.Process.  MyAbstractProcess is included in my.jar, which I've added to both the compile path and, at runtime, the bootclasspath.  The intent is to make visible some process attributes that are meaningful when running on our OS.
>
> The problem with CreateSymbols is that it explicitly ignores any classpath and sourcepath settings and instead uses the bootclasspath for the bootstrap JVM.  It modifies the path to use the newly generated rt-orig.jar instead of rt.jar, but otherwise uses all the other jar files from the bootstrap JVM.  It seems to me that it should be using the class paths set in the JAVAC_CMD macro, rather than overriding them.
>
> I was able to work around this by adding my jar file to the bootclasspath for the bootstrap JVM, but that's not particularly easy since there are two very different definitions for JAVAC_CMD.
>
> Have I broken an assumption/requirement that rt.jar have no dependencies?
>
>

Short answer: yes.

Longer answer: this is more of a question for build-infra-dev, but I 
would not expect supporting this use case to get a high-priority in the 
standard JDK build. Also, if you are porting the JDK sources to another 
OS, the porters group may be able to give guidance on how to incorporate 
platform-specific functionality in a way that integrates better with the 
rest of the build and system.

HTH,

-Joe



More information about the compiler-dev mailing list