Centos7上编译open jdk9
程序员文章站
2024-03-16 21:46:58
...
一、准备
确保服务器能连上网,最好能连国外的网。
安装Java环境
安装hp
#yum install mercurial
二、 安装必要的包
#yum -y groupinstall "Development Tools"
#yum -y install libXtst-devel libXt-devel libXrender-devel libXi-devel
#yum -y install cups-devel
#yum -y install freetype-devel
#yum -y install alsa-lib-devel
#yum -y install elfutils-libelf-devel
三、获取源码
#mkdir -p /opt/openjdk9
#cd /opt/openjdk9
#hg clone http://hg.openjdk.java.net/jdk9/jdk9 src
四、编译
#bash ./configure --with-target-bits=64 --disable-warnings-as-errors
#make clean
#make images
五、验证
./build/linux-x86_64-normal-server-release/images/jdk/bin/java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-adhoc.root.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-adhoc.root.src, mixed mode)