- Contents
- House Keeping
- Programming Model
- Interface Mapping
- Implementation Detail
Openjdk Babylon can be found here https://github.com/openjdk/babylon
If you follow the steps below to build babylon, you should not have to change any of the maven or cmake build files for hat.
You will need an existing version of JDK to build babylon and jtreg.
The following build process assumes you have BOOT_JDK set to an existing JDK
export BOOT_JDK=${HOME}/java/jdk-22.0.1.jdk/Contents/Home/If you don't have jdk22, these steps are slightly different for Mac OSX and Ubuntu
cd ${HOME}/java
wget https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_linux-x64_bin.tar.gz
export BOOT_JDK=${HOME}/java/jdk-22.0.1.jdk
cd ${HOME}/java
wget https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_linux-x64_bin.tar.gz
export BOOT_JDK=${HOME}/java/jdk-22.0.1.jdk/Contents/Home
We suggest starting with a 'github' dir where we will install babylon, hat, jtreg and other hat dependencies
The HAT maven build will assume that ${GITHUB} -> ${HOME}/github
export GITHUB=${HOME}/github
mkdir -p ${GITHUB}
mkdir -p ${HOME}/javahttps://github.com/openjdk/babylon.git
cd ${GITHUB}
git clone https://github.com/openjdk/babylon.gitIn order to run openjdk tests we will need to get and build jtreg
https://github.com/openjdk/jtreg
cd ${GITHUB}
git clone https://github.com/openjdk/jtregWe will build it now using our BOOT_JDK
export JTREG_HOME=${GITHUB}/jtreg
cd ${JTREG_HOME}
bash make/build.sh --jdk ${BOOT_JDK}
export JTREG=${JTREG_HOME}/build/images/jtregcd ${GITHUB}
git clone https://github.com/openjdk/babylon.git
cd ${GITHUB}/babylon
bash configure --with-boot-jdk=${BOOT_JDK} --with-jtreg=${JTREG}If you have never built JDK before you may find that the 'configure' step will suggest packages to install.
I usually just keep running bash configure and take suggestions until I get a successful babylon build.
You now should have
github
├── babylon
│ ├── build
│ │ └── XXXX-server-release
│ │ ├── jdk
│ │ └── ...
│ ├── hat
│ │ ├── ...
Where XXXX is either linux-x64 or macosx-aarch64 and contains your build of babylon JDK.
make clean
make images
#Coffee time (about 10 mins?)If we included jtreg above we can run the babylon code reflection tests using
cd ${GITHUB}/babylon
make test TEST=jdk_lang_reflect_codeThis works because we added
8<-
jdk_lang_reflect_code = \
java/lang/reflect/code
->8
To the file ${GITHUB}/babylon/test/jdk/TEST.groups
The tests themselves can be found in this directory
tree {GITHUB}/babylon}/test/jdk/java/lang/reflect/code