How to build OpenJDK

Building OpenJDK with our makejdk-any-platform.sh script is really simple…

git clone https://github.com/AdoptOpenJDK/openjdk-build.git

Docker Build

./makejdk-any-platform.sh

Optionally specify --destination <path> if you want the binary to be copied to your machine.

Local Build

./makejdk-any-platform.sh --source $PWD --destination $PWD/OpenJDK.tar.gz

Troubleshooting

If you have any issues build OpenJDK then you can check all of the command line flags using:

./makejdk-any-platform.sh --help

It’s also worth checking here for the latest issues if you are having problems.

Do you have questions or want to discuss this post? Hit us up on the AdoptOpenJDK Slack workspace!


George Adams

Posted by George AdamsJava Program Manager @microsoft, Chair of TSC @AdoptOpenJDK, Core Collaborator @nodejs

© 2017–2024, Built with Gatsby