环境:

  • ubuntu版本
    image.png
  • jdk-7u80-linux-x64.tar.gz
  • openjdk-8u40-src-b25-10_feb_2015.zip
  • ~/.bashrc环境变量配置如下:

    export JAVA_HOME=/home/nasuf/Documents/jdk1.7.0_80
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export PATH=$JAVA_HOME/bin:$PATH
  • 执行以下命令安装相关依赖:

    sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libcups2-dev libfreetype6-dev libasound2-dev ccache
  • 将jdk7和open-jdk压缩包解压后,进入到openjdk目录下,执行以下命令:

    chmod u+x configure 
    sudo ./configure --with-target-bits=64 --with-boot-jdk=/home/nasuf/Documents/jdk1.7.0_80 --with-debug-level=slowdebug --enable-debug-symbols ZIP_DEBUGINFO_FILES=0

    image.png

  • 执行编译:

    sudo make all DISABLE_HOTSPOT_OS_VERSION_CHECK=OK ZIP_DEBUGINFO_FILES=0

    image.png

  • 最后修改java home为最新编译后的openjdk

    export JAVA_HOME=/home/nasuf/Documents/openjdk/build/linux-x86_64-normal-server-slowdebug/jdk

    image.png


nasuf
557 声望21 粉丝

引用和评论

0 条评论