如何从源代码构建Java JRE(JDK中的src.zip)? [英] How does one build the java JRE from source (src.zip in JDK)?

查看:87
本文介绍了如何从源代码构建Java JRE(JDK中的src.zip)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

令人惊讶的是,我找不到这个问题的答案.

Surprisingly enough I couldn't find the answer to this question.

我正在尝试从源代码重建Java JRE.我通过提取JDK中的src.zip文件来获得Java JRE源.

I am trying to rebuild the java JRE from source. I obtain the java JRE source by extracting the src.zip file in the JDK.

在需要对JRE进行任何更改之后,如何将新源代码重新编译为.java文件(之后可以将其压缩为rt.jar文件).

After making any changes I need to make to the JRE, how do I compile the new source back into .java files (after which I can compress it into the rt.jar file).

谢谢.

推荐答案

一些Java来源rt.jar是在构建期间生成的通过脚本和其他方式进行处理.一些属性文件也产生这种方式,和一些属性文件变成Java也有助于rt.jar.所以没有做一个完整的首先建立并填充'gensrc'目录,您将不会拥有所有构成rt.jar的资源.

Some of the Java sources that make up rt.jar are generated during the build process, from scripts and other means. Some of the properties files are also generated this way, and some of the properties files are turned into Java source that also contributes to rt.jar. So without doing a complete build first and populating the 'gensrc' directory, you won't have all the sources that make up rt.jar.

来自: http://www.java.net/forum/topic/jdk/java-se-snapshots-project-feedback/it-possible-just-build-rtjar

因此,当您在src.zip中的所有Java文件上说javac时,由于依赖关系图损坏(缺少生成的文件),它将无法编译

So when you say javac on all the java files inside src.zip it won't compile as the dependency graph is broken (missing generated files)

也请看一下: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆