openjdk编译

来源:互联网 发布:环球慧思海关数据登陆 编辑:程序博客网 时间:2024/04/29 07:58

1 下载 openjdk :  https://jdk7.java.net/source.html

2 build 依赖工具下载 : 1 gcc ,make  2 cpus 3 alsa 4 零碎工具

3 环境变量配置脚本:

#!/bin/bash
export LANG=C
export ALT_BOOTDIR=/usr/bin/ jdk  #!!!!!!!!! 用来编译的完整jdk  
export ALLOW_DOWNLOADS=true #是否需要自动下载,jaxp,jaws可以自动下载
export SKIP_DEBUG_BUILD=false #是否跳过编译debug版
export SKIP_FASTDEBUG_BUILD=false #是否跳过编译fastdebug版
export DEBUG_NAME=debug

#-------------------

export BUILD_LANGTOOLS=true
export BUILD_JAXWS=true
export BUILD_CORBA=true
export BUILD_JAXP=true
export BUILD_HOTSPOT=true
export BUILD_JDK=true


unset CLASSPATH
unset JAVA_HOME

make sanity && make

4 启动脚本

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ps 遇到的 报错

1 hotspot :http://my.oschina.net/u/2358721/blog/525510  gamma: 去掉 hotspot/make/linux/MakeFile 中的所有test_gamma

2 hotspot  vim `find . -name 'CurrencyData.properties'` 把里面的时间改在10年之内  文件应该是 ./jdk/src/share/classes/java/util/CurrencyData.properties

3 hotspot X11/extensions/Xrender.h   --->install xrender ;  X11/extensions/shape.h -->install libxi-dev


总结:success build openjdk

0 0