本文介绍了如何在Ubuntu 11.10上编译OpenJDK 7调试版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在哪里可以找到一组简单的说明来编译Ubuntu 11.10上的 7调试版本(Oneiric )?调试版本将使更多JVM选项可用于故障排除;例如, WizardMode
。 和有很多噪音,很难遵循。
Where can I find a simple set of instructions to compile an OpenJDK 7 debug build on Ubuntu 11.10 (Oneiric)? A debug build would make more JVM options available for troubleshooting purposes; for example, WizardMode
. The developers' guide and build README have a lot of noise and are hard to follow.
推荐答案
- 安装相关软件包:
sudo apt-get install ant build-essential openjdk-6-jdk
sudo apt-get build-dep openjdk-6-jdk
- 找到您要开始的主人。这些说明将使用
jdk7u2
。 - 命令示例包含允许通过代理服务器进行Internet访问的设置;
- 克隆Mercurial顶级林存储库:
- Find the master OpenJDK Mercurial repository you want to start from. These instructions will use
jdk7u2
. - Command examples contain settings to allow Internet access through a proxy server; remove them if they are unnecessary for you.
- Clone the Mercurial top-level forest repository:
$ mkdir jdk7u2
$ cd jdk7u2
$ hg --config http_proxy.host=proxy:1234 clone http://hg.openjdk.java.net/jdk7u/jdk7u2 forest
$ cd forest
$ sh ./get_source.sh
- 编译声音库时,构建将失败。根据建议,使用以下方法修补相应的
Makefile
: - The build will fail while compiling the sound libraries. As suggested here, use the following to patch the appropriate
Makefile
:
$ echo -e "--- old/jdk/make/javax/sound/jsoundalsa/Makefile 2012-01-28 12:00:00.000000000 -0500\n+++ new/jdk/make/javax/sound/jsoundalsa/Makefile 2012-01-28 12:00:00.000000000 -0500\n@@ -65,7 +65,7 @@\n \t\$(MIDIFILES_export) \\\\\n \t\$(PORTFILES_export)\n\n-LDFLAGS += -lasound\n+EXTRA_LIBS += -lasound\n \n CPPFLAGS += \\\\\n \t-DUSE_DAUDIO=TRUE \\\\" | patch -p1
- 编译:
$ export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=1234 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=1234"
$ . jdk/make/jdk_generic_profile.sh
$ make ALLOW_DOWNLOADS=true fastdebug_build
- 编译需要一段时间/ li>
- 验证构建:
$ build/linux-amd64-fastdebug/j2sdk-image/bin/java -version
openjdk version "1.7.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.7.0-internal-fastdebug-user_2012_01_28_13_25-b00)
OpenJDK 64-Bit Server VM (build 22.0-b10-fastdebug, mixed mode)
$ build/linux-amd64-fastdebug/j2sdk-image/bin/java -XX:+AggressiveOpts -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -XX:+PrintFlagsWithComments -version
- 如果您有问题,请先阅读和。
- If you have problems along the way, begin by reading The OpenJDK Developers' Guide and the OpenJDK Build README.
这篇关于如何在Ubuntu 11.10上编译OpenJDK 7调试版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!