Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ OpenJDK7 source compiler installation on CentOS 6.5     - Linux based exercises, interview questions (Linux)

- CentOS network configuration 7, and set the host name and IP-bound problems (Linux)

- Oracle Listener can not start (TNS-12555, TNS-12560, TNS-00525) (Database)

- To create someone else can not afford to delete the administrator user (Linux)

- CentOS 6.5 three ways to configure the IP address (Linux)

- Installation salt-minion on RHEL5 (Linux)

- Linux security settings Notes (Linux)

- Effect MongoDB plan cache (Database)

- Graphical development environment to build Android under Ubuntu 11.04 (Linux)

- How to install or upgrade to the Linux kernel in Ubuntu 4.2 (Linux)

- Use PDFBox processing PDF documents (Linux)

- Intrusion prevention network server security maintenance tips (Linux)

- Linux Mint under tty.js Installation Guide (Linux)

- Linux find and xargs (Linux)

- Linux Network Security: nmap port scanning software (Linux)

- PHP with FastCGI and mod_php Comments (Server)

- Four Methods of Self - Learning Linux (Linux)

- Linux System Getting Started Tutorial: Using the Linux common commands (Linux)

- Linux System Getting Started Learning: The Linux log (Linux)

- Linux awk text analysis tool (Linux)

 
         
  OpenJDK7 source compiler installation on CentOS 6.5
     
  Add Date : 2017-01-08      
         
       
         
  The OpenJDK open source version, gets its source in two ways:

Mercurial pass code version management tools taken directly from the Repository source, but the speed is too slow, it takes a few hours

Download the official packaged source package (recommended)

Download Source openjdk-7u6-fcs-src-b24-28_aug_2012.zip, unzip, download the following address:

http://www.java.net/download/openjdk/jdk7u6/promoted/b24/openjdk-7u6-fcs-src-b24-28_aug_2012.zip

The compiler uses a 64-bit OS, 64-bit compiler is the JDK, requires at least 512MB of memory

1. Basic Process

(Read the README and README-builds.html)

README-builds.html contains detailed installation information, it is best to complete reading it.

2. Install Base Package

My CentOS6.5 mounted on vmware10, when installation is minimized (Minimal) Installation

[Root @ localhost ~] # cat / etc / RedHat-release
CentOS release 6.5 (Final)
[Root @ localhost ~] # uname -m
x86_64
[Root @ localhost ~] # uname -r
2.6.32-431.el6.x86_64
Configure update source

cd /etc/yum.repos.d/
curl http://mirrors.163.com/.help/CentOS6-Base-163.repo> CentOS6-Base-163.repo
Current wget yet able

#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS6-Base-163.repo CentOS-Base.repo
yum makecache

yum -y groupinstall 'base'
yum -y install make
Install jdk prerequisite packages:

yum -y install alsa-lib-devel
yum -y install cups-devel
yum -y install libXi-devel
yum -y install gcc gcc-c ++
yum -y install libX *
Upload or download files to / application / tools

mkdir -p / application / tools
cd / application / tools
Upload or download the following documents to / application / tools

freetype-2.3.12.tar.gz Download: http: //sourceforge.net/projects/freetype/files/freetype2/

Download openjdk-7u6-fcs-src-b24-28_aug_2012.zip earlier

apache-ant-1.7.1-bin.zip Download: http: //archive.apache.org/dist/ant/binaries/

jdk-6u26-linux-x64.bin Download: http: //www.Oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u26-oth-JPR

Compile and install freetype:

tar -xzf freetype-2.3.12.tar.gz
cd freetype-2.3.12
./configure
make
make install
Install JDK:

Unzip jdk-6u26-linux-i586.bin to the next application / java / directory

Set the environment variable as follows:

#set java environment
JAVA_HOME = / application / java / jdk
export JRE_HOME = / application / java / jdk / jre
export CLASSPATH =:. $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH
export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin: $ PATH
Install ant:

cd / application / tools /
unzip apache-ant-1.7.1-bin.zip
ln -s /application/tools/apache-ant-1.7.1/bin/ant / usr / bin / ant
Check the java and ant:

[Root @ localhost ~] # java -version
java version "1.6.0_26"
Java (TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot (TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
[Root @ localhost ~] # ant
Buildfile: build.xml does not exist!
Build failed
3. Configuration Variables

nset CLASSPATH
unset JAVA_HOME
export LANG = C
export ALT_BOOTDIR = / application / java / jdk
export ANT_HOME = / application / tools / apache-ant-1.8.1 /
export ALT_FREETYPE_LIB_PATH = / usr / local / lib
export SKIP_DEBUG_BUILD = false
export SKIP_FASTDEBUG_BUILD = true
export DEBUG_NAME = debug
export ALT_FREETYPE_HEADERS_PATH = / usr / local / include / freetype2
4. Check the environment is configured OK and compile jdk source

[Root @ localhost tools] # cd openjdk
[Root @ localhost openjdk] # pwd
/ Application / tools / openjdk
[Root @ localhost openjdk] # make sanity
......

OpenJDK-specific settings:
FREETYPE_HEADERS_PATH = / usr / local / include / freetype2
ALT_FREETYPE_HEADERS_PATH = / usr / local / include / freetype2
FREETYPE_LIB_PATH = / usr / local / lib
ALT_FREETYPE_LIB_PATH = / usr / local / lib

Previous JDK Settings:
PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE
ALT_PREVIOUS_RELEASE_PATH =
PREVIOUS_JDK_VERSION = 1.6.0
ALT_PREVIOUS_JDK_VERSION =
PREVIOUS_JDK_FILE =
ALT_PREVIOUS_JDK_FILE =
PREVIOUS_JRE_FILE =
ALT_PREVIOUS_JRE_FILE =
PREVIOUS_RELEASE_IMAGE = / application / java / jdk
ALT_PREVIOUS_RELEASE_IMAGE =


Sanity check passed.

Execute the following command:

[Root @ localhost openjdk] # make all
Build times ----------
Target debug_build
Start 2015-05-05 09:34:37
End 2015-05-05 10:24:33
00:05:23 corba
00:10:49 hotspot
00:00:55 jaxp
00:01:07 jaxws
00:30:05 jdk
00:01:36 langtools
00:49:56 TOTAL
-------------------------
make [1]: Leaving directory `/ application / tools / openjdk '

View Results:

[Root @ localhost openjdk] # ./build/linux-amd64/bin/java -version
openjdk version "1.7.0-internal-debug"
OpenJDK Runtime Environment (build 1.7.0-internal-debug-root_2015_05_05_09_15-b00)
OpenJDK 64-Bit Server VM (build 23.2-b09-jvmg, mixed mode)
     
         
       
         
  More:      
 
- Ubuntu 12.04 / 14.04 users to install software LyX document processing (Linux)
- Oracle 11g partition maintenance (two) - Coalescing Partitions (Database)
- xCAT line installation on CentOS 6.X (Linux)
- Computer security perimeter recommendations (Linux)
- Java JDK has been able to compile without warning (Programming)
- Loop arrays in C language is not easy to find a bug (Programming)
- MySQL multi-master-slave synchronization (Database)
- Compiling source code Nginx module installation subs_filter (Server)
- Sublime Text 3 using summary (Linux)
- Python 2 Chinese garbage problem solved (Linux)
- MySQL display operation control tips (Database)
- EXP-00091: Exporting questionable statistics Processing Method (Database)
- Ubuntu system cp: omitting directory problem (Linux)
- Mongo-connector integrated MongoD to achieve incremental Solr index (Server)
- QBit development of micro-services (Server)
- Sort sql MySQL 5.6 upgrade slow Cause Analysis (Database)
- Based on Google Cloud Storage Mirroring open Maven Central Repository (Server)
- Linux - use chroot command (Linux)
- To share Linux script automatically change passwords (Linux)
- To install PostgreSQL 9.4 (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.