Reference: http://hg.openjdk.java.net/jdk/jdk/file/tip/doc/building.md
Group installation of "Developer Tools" (*) No work is required if "Developer Tools" is checked when installing the OS.
# yum groupinstall -y "Development Tools"
Introducing dependent packages required for openjdk build The bootstrap JDK uses the previous major release JDK (OpenJDK 7) (Reference) http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html#setup
# yum install -y java-1.7.0-openjdk-devel
# yum install -y libXtst-devel libXrender-devel cups-devel freetype-devel alsa-lib-devel libXt-devel fontconfig-devel
Version control tool Mercurial installation
# yum install -y mercurial
###Version 2.6.If it is older than 3, rpm direct DL & install from the original Mercurial
# curl -OL https://www.mercurial-scm.org/release/centos7/RPMS/x86_64/mercurial-4.9-1.x86_64.rpm
# rpm -Uvh mercurial-4.9-1.x86_64.rpm
When the home directory for build is / usr / local / src / openjdk8
# cd /usr/local/src
# hg clone http://hg.openjdk.java.net/jdk8u/jdk8u openjdk8u
# cd openjdk8u
# chmod +x get_source.sh
# ./get_source.sh
# cd /usr/local/src/openjdk8u
# chmod +x configure
# ./configure
# cd /usr/local/src/openjdk8u
# make images
Build artifacts are generated under build / linux-x86_64-normal-server-release / images / j2sdk-image (JRE is under j2jre-image) Check and verify the version with the new java command binary generated
# cd /usr/local/src/openjdk8u
# cd ./build/linux-x86_64-normal-server-release/images/j2sdk-image
# ./bin/java -version
Recommended Posts