OpenJDK13 debug code compiler

Environment: ubuntu18.04 + clion

First, compile

1. Download openjdk13 Source

2. Install the required environment dependent compilation 

apt-get install libfreetype6-dev libcups2-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libasound2-dev libffi-dev autoconf gcc clang libfontconfig1-dev

3. Install jdk12 or jdk13, in this document which is called  the Boot JDK , is the need for a version of the JDK as a compile-time basis, generally using the N-1 versions, such as the compiler OpenJDK8 on the use of JDK7 Boot JDK, used here jdk13 do bootjdk

add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt-get install openjdk-13-jdk

4. Check the configuration

bash configure

If an exception process is being executed, the abnormality information and prompts to install the missing dependencies

5. Start compilation

make images

6. Verify after compilation is available

./build/*/images/jdk/bin/java -version

 

 

Second, commissioning jvm

1. Select  New CMake Project from Sources,  open our download OpenJDK13 directory, all the way to wait for next import is complete

2. Start configuration items:

1) target and excutable configuration shown below

2) Build needs deleted

3) Use javac command to compile Test.java Test.class

4) preparation of META-INF / MANIFEST.MF file execution determination inlet

// file META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.8.0_171 (Oracle Corporation)
Main-Class: Test

5) Test labeled jar package

jar cvfm Test.jar META-INF/MANIFEST.MF Test.class

6) program aguments working directory, and configured as follows

Published 504 original articles · won praise 610 · Views 1.14 million +

Guess you like

Origin blog.csdn.net/asdfsadfasdfsa/article/details/103401127