Bootstrap

ubuntu下编译openjdk17,依赖的包名有所不同

步骤

  1. 首先,编译需要一个JDK。openJDK17需要JDK16,openJDK17的源码我在https://openjdk-sources.osci.io/下载,JDK16我在oracle官网下载已编译的包:https://www.oracle.com/java/technologies/javase/jdk16-archive-downloads.html
  2. 安装依赖软件,别的教程是libX11-devel, libXext-devel, libXrender-devel, libXrandr-devel, libXtst-devel, libXt-devel, libXi-devel, cpus-devel, fontconfig-devel, alsa-devel, 用apt-get下载的话要改成以下:
sudo apt-get update
sudo apt-get install autoconf zypper

sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libxi-dev

sudo apt-get install libcups2-dev
sudo apt-get install libfontconfig-dev
sudo apt-get install libasound2-dev

  1. 解压openjdk17和jdk16的压缩包
    在这里插入图片描述
cd /home/kiramario/software/jdk-17.0.2-ga

bash configure --with-debug-level=slowdebug --with-target-bits=64 --disable-warnings-as-errors --with-jvm-variants=server --with-boot-jdk=/home/kiramario/software/jdk-16.0.2

sudo make all
sudo make install

结果

Building target 'install' in configuration 'linux-x86_64-server-slowdebug'
Warning: No SCM configuration present and no .src-rev
Installing jdk image into /usr/local/jvm/openjdk-17.0.2-internal
and creating 56 links from /usr/local/bin into the jdk.
Finished building target 'install' in configuration 'linux-x86_64-server-slowdebug'

在这里插入图片描述
在这里插入图片描述

;