centos compile openjdk1.8

A ready environment

  1. Compile openjdk1.8 need a lower than this version of "Start jdk", so I chose to install a precompiled openjdk 1.7, this openjdk directly to the official website to download it, the following is required to install the package, final the first two can not be installed, then install error when required, if the last two yum install package can not find the newspaper, go to the official website to download and then compile it yourself.

ccache official website: https://ccache.dev/ (after downloading need to configure the environment variable)

Baidu's openjdk direct download is slow, and even downloaded the package is damaged, it may be necessary to download the Internet over the wall, providing a web site is here to download openjdk, pay attention to the points go after

Right-click the URL in the source selection to use Thunder download it, do not just click, the page will jump to a baffling

openjdk:https://download.java.net/openjdk/jdk8

Note: The case of the downloaded installation package there is a missing certain folders, re-download it

1 yum groupinstall "Development Tools"  
2 yum install libXtst-devel libXt-devel libXrender-devel  
3 yum install cups-devel  
4 yum install freetype-devel  
5 yum install alsa-lib-devel  
6 yum install ccache
7 yum install freetype2

  

  2. Environmental ready after you use the following command to test environment is configured OK, - with-boot-jdk = path behind you start the JDK path, after the implementation of the compiler can not ERROR

bash ./configure --with-target-bits=64 --with-boot-jdk=/usr/java/MYBOOTJDK_1.7/ --with-debug-level=slowdebug --enable-debug-symbols ZIP_DEBUGINFO_FILES=0

  3. Use the make all command to start compiling, note that to ensure java environment variables are annotated and compiled openjdk are 1.8, 1.7 and compile because of the different ways 1.8, 1.7 is not above command, various parameters need to environment variable settings, but also to modify the properties and parameters jdk Makefile in a lot of trouble, and that you need to install ant to compile, but 1.8 is to use the above command to set the parameters without modifying parameters openjdk in, make all after waiting on it, about 20 minutes or, if an error is nothing wrong with just reading the newspaper, and then change it.

  4. start after the completion can be uninstalled and then put on fresh-baked jdk jdk to try and see

 

Guess you like

Origin www.cnblogs.com/lollong/p/11620283.html