Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

fifty-five。 Write down the process of compiling OpenJDK9 source code on mac os

Shulou Source: shulou.com Published: 2022-06-03 06:04:07 09月24日 Update

one。 OpenJDK code download

Go to the official website of OpenJDK and download it through hg, such as referring to this post.

Https://www.jianshu.com/p/746963f28245

But downloading code with hg (usage similar to git) often fails, and I modify the script to download it in an infinite loop, which has been a failure for half a day.

Download it on github. This method is recommended.

If you find an OpenJDK9 code on github, just git clone it directly, as follows:

Command line executes git clone git@github.com:campolake/openjdk9.gitgithub address https://github.com/campolake/openjdk9

two。 Compile

You can https://www.jianshu.com/p/746963f28245 by referring to the above post.

But there are a few things that are different.

Export FREETYPE_LIB_PATH and FREETYPE_INCLUDE_PATH. If there is no freetype, you can brew install freetype first.

Export FREETYPE_LIB_PATH=/usr/local/Cellar/freetype/2.9.1/lib/

Export FREETYPE_INCLUDE_PATH=/usr/local/Cellar/freetype/2.9.1/include

Configure ordered to use other people's comments in the above post.

Bash. / configure-enable-debug-with-target-bits=64-with-jobs=8-disable-warnings-as-errors-with-jvm-variants=server

Make starts compilation

three。 Compilation error

The compilation process was smooth and encountered these problems.

Ordered comparison between pointer and zero, this is to modify the source code and change > 0 to! = NULL

Refer to this post

Https://www.cnblogs.com/weixliu/

Finally, after compiling, I ran the java version

Tags: Compile post code reference command source code procedure different code download address comment that is method version script error problem loop recommendation above Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MariaDB OPPO Reno Apple Redmi