Compilation of Openjdk7

Source: Internet
Author: User

First Step installation dependent
Execute the following shell

# 因为我已经装了ant和jdk(注意这个jdk,所以不再安装)sudo apt-get install buildessential gawk m4 libasound2-dev libcups2-dev libxrender-dev xorg-dev xorg-dev xutils-dev x11proto-print-dev binutils libmotif3 libmotif-dev

Step two download Install bootstrap JDK
: HTTP://WWW.ORACLE.COM/TECHNETWORK/JAVA/JAVASE/DOWNLOADS/JAVA-ARCHIVE-DOWNLOADS-JAVASE6-419409.HTML?SSSOURCESITEID=OTNCN
The bootstrap JDK used to compile the openjdk7 cannot be a high version, it must be JDK6 (remember the Tears of blood).
I installed it in/home/jasper/software/apache/jdk1.6.0_45.

Step three download Openjdk7 source code
: http://jdk7.java.net/source.html
Download down is a zip file, decompression can be.
I'll unzip it to/home/jasper/software/apache/openjdk_7u40.

Fourth step to modify Currencydata.properties date
Open File/home/jasper/software/apache/openjdk_7u40/openjdk/jdk/src/share/classes/java/util/currencydata.properties
Modify all dates in this file. such as the corresponding +n year, to ensure that all dates are within the last 10 years

Fifth step setting the environment variables required for compilation
Execute the following shell

CD/home/jasper/software/apache/openjdk_7u40/openjdk# Bootstrap The installation path of the JDK. Must fill inExportAlt_bootdir=/home/jasper/software/apache/jdk1.6.0_45# Allow automatic download dependenciesExportallow_downloads=true# Number of threads compiled in parallel, set to the same number of CPU coresExporthotspot_build_jobs=6Exportalt_parallel_compile_jobs=6# Compare the image of this build with the previous version. Exportskip_compare_images=true# Using Precompiled header files, not adding this compilation will be slowerExportUse_precompiled_header=true# What to compileExportbuild_langtools=trueExportbuild_hotspot=trueExportbuild_jdk=true# Set it to false to avoid build of parts such as Javaws and browser Java pluginsbuild_deploy=false# Set it to false to not build the installation package. Because there are some strange dependencies in the installation package# But even if you don't build it, you can already get a full JDK image, so don't build it.Build_install=false# The path where the compilation results are storedExportAlt_outputdir=/home/jasper/software/apache/openjdk_7u40/build# These two environment variables have to be removed, or something weird will happen.unsetJava_homeunsetCLASSPATH# output log? Make2>&1| Tee$ALT _outputdir/build.log# Compile settings check# Make Sanity

Note To see if there is a final error, such as error please install the corresponding dependency

The sixth step executes the following shell

cd /home/jasper/software/apache/openjdk_7u40/openjdkmake

PS: Please carry out all the shells mentioned above in one terminal.

Compilation of Openjdk7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.