当前位置:   article > 正文

centos7下openjdk11源码下载编译安装_openjdk11下载

openjdk11下载

##openjdk11源码编译环境

centos7内核3.10.0-1160.102.1.el7.x86_64

gcc version 7.3.1

g++ version 7.3.1

##引导JDK

cd /home/yym/code/

wget https://mirrors.huaweicloud.com/java/jdk/10.0.1+10/jdk-10.0.1_linux-x64_bin.tar.gz

##解压jdk10

tar -zxvf jdk-10.0.1_linux-x64_bin.tar.gz

##openjdk11源码下载

cd /home/yym/code/

yum install wget

wget https://codeload.github.com/openjdk/jdk11/zip/refs/heads/master

##解压openjdk11源码

yum install unzip

unzip jdk11-master.zip

##安装编译openjdk11源码需要的依赖包

yum install autoconf

yum install libX11-devel.x86_64

yum install libXext-devel.x86_64

yum install libXrender-devel.x86_64

yum install libXtst-devel.x86_64

yum install libXt-devel.x86_64

yum install libXi-devel.x86_64

yum install libXrandr-devel.x86_64

yum install cups-devel.x86_64

yum install fontconfig-devel.x86_64

yum install alsa-lib-devel.x86_64

##配置编译参数

cd /home/yym/code/jdk11-master

bash configure --with-num-cores=8 --with-memory-size=16,384 --with-boot-jdk=/home/yym/code/jdk-10.0.1 --with-debug-level=slowdebug --disable-warnings-as-errors

备注:

--with-num-cores=8 指8核cpu

--with-memory-size=16,384 指16G内存

--with-boot-jdk=/home/yym/code/jdk-10.0.1 指引导jdk路径

##编译openjdk11

make CONF=linux-x86_64-server-slowdebug

##使用编译完的openjdk11

/home/yym/code/jdk11-master/build/linux-x86_64-server-slowdebug/jdk/bin/java -version

##清除上一次编译

make clean CONF=linux-x86_64-server-slowdebug

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/874031
推荐阅读
相关标签
  

闽ICP备14008679号