Build error with javac Main not being found when building java.transaction module on Mac OS X

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Feb 6 17:13:50 UTC 2015


Martijn,

Welcome to the world of bootstrapping the build.

The BOOTJDK is only guaranteed to understand -source 8 (when building 
9)  so we use the BOOTJDK javac to compile an interim javac from the 
latest source code, which can understand -source 9.   (This requires and 
implies that javac is written with -source 8 in mind and does not use 
the very latest language features being developed in the current 
release.)   That "interim javac" is then executed using the BOOTJDK 
runtime to compile all the JDK source using -source 9. It even compiles 
itself again to generate classes to include in the product so that all 
the JDK files have been compiled with the latest javac, including itself.

But not sure from what you have said so far why the interim javac has 
not been built.

-- Jon

On 02/06/2015 08:46 AM, Martijn Verburg wrote:
> Hi Andrew,
>
> Thanks, that was dense of me not to do that first.
>
> Using debug output I discover that there are more than just one javac
> involved, one from interim_langtools.jar
>
> ========
>
> ...
> SetupJavaCompiler(BOOT_JAVAC)
>   [2] JAVAC :=
> /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/javac
>   [3] FLAGS := -XDignore.symbol.file=true -g -Xlint:all,-deprecation -Werror
> ...
> ...
> SetupJavaCompiler(GENERATE_USINGJDKBYTECODE)
>   [2] JVM :=
> /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java
> -XX:+UseSerialGC -Xms32M -Xmx512M
>   [3] JAVAC :=
> "-Xbootclasspath/p:/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim_langtools.jar"
> -cp
> /Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim_langtools.jar
> com.sun.tools.javac.Main
>   [4] FLAGS := -bootclasspath
> ":/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction"
> -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
>   [5] SERVER_DIR :=
>   [6] SERVER_JVM :=
> /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java
> -d64 -Xms512M -Xmx2048M
> ...
>
> ==========
>
> /Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim_langtools.jar
> does not exist!  So it's not being built correctly or moved to the right
> place.
>
> I'm not seeing any other clues (even at trace) that indicates why
> interim_langtools.jar has not been built....
>
>
>
>
> Cheers,
> Martijn
>
> On 6 February 2015 at 16:24, Andrew Haley <aph at redhat.com> wrote:
>
>> On 02/06/2015 04:20 PM, Martijn Verburg wrote:
>>> Is there a way of printing out the absolute path to the javac it might be
>>> trying to execute?  I wonder if it goes looking elsewhere during the
>>> build...
>> Are you not building with LOG=debug ?
>>
>> Andrew.
>>
>>



More information about the jdk9-dev mailing list