Ubuntu14.04.3 64位环境下openjdk7编译

系统环境:Ubuntu14.04.3 -amd64 in VMWare
1.安装openjdk7依赖

sudo apt-get build-dep openjdk-7
sudo apt-get install openjdk-7-jdk

sudo apt-get install build-essential gawk m4 libasound2-dev libcups2-dev libxrender-dev xorg-dev xutils-dev x11proto-print-dev ant

sudo mkdir /usr/X11R6
cd /usr/X11R6/
sudo ln -s -T /usr/lib lib

2.安装oracle jdk到/usr/lib/jvm 
3.将/src/share/classes/java/util目录下的CurrencyData.properties文件中的时间改为当前时间10年以内 
4.编译脚本:

#!/bin/bash
export LANG=C
export ALT_BOOTDIR=/usr/lib/jvm/jdk1.7.0_17 
export ALT_DEVTOOLS_PATH=/usr/bin
export ALLOW_DOWNLOADS=true #是否需要自动下载,jaxp,jaws可以自动下载
export SKIP_DEBUG_BUILD=false #是否跳过编译debug版
export SKIP_FASTDEBUG_BUILD=false #是否跳过编译fastdebug版
export DEBUG_NAME=debug
export HOTSPOT_BUILD_JOBS=4 
export ALL_PARALLEL_COMPILE_JOBS=4
export ALT_DEVTOOLS_PATH=/usr/bin
export SKIP_COMPARE_IMAGES=true
export USE_PRECOMPILED_HEADER=true
BUILD_DEPLOY=false
BUILD_INSTALL=false
unset CLASSPATH
unset JAVA_HOME
make sanity & make all 2>&1

运行编译脚本。

原文地址:https://www.cnblogs.com/iceAeterNa/p/4877060.html