我觉得这很容易。 我下载了JDK,解压缩了src.zip,修改了JDK以满足我的需求并保存了文件。
现在,我唯一需要做的就是将提取的和更新的src文件夹重新编译为“JRE”。 我尝试使用javac,但没有得到任何结果。 例如,我得到的错误是没有给出源文件。 我很明显没有使用正确的语法来编译JRE。
那么,任何人都可以告诉我,你如何最终得到一个工作的“JRE”文件夹,其中包含一个基于从JDK中提取的新源文件夹的修改过的Java Runtime Environment?
注意:我不打算重新分发编译。 仅供个人自用。
更新:感谢答案和http://www.javalobby.org/java/forums/t103334.html我得到以下命令: "c:\tmp\jdk1.6.0_17\bin\javac" -classpath "c:\tmp\out" -verbose -g -d "c:\tmp\out" -J-Xmx512m -cp "c:\jdk1.6.0_17\jre\lib\rt.jar";"c:\jdk1.6.0_17\lib\tools.jar" @files.txt - 遗憾的是,虽然它确实处理了事情,但完成后输出文件夹/ out为空。 我的命令有问题吗?
提前致谢。
I thought this would be very easy. I downloaded the JDK, extracted src.zip, modified the JDK to fit my needs and saved the file.
Now, the only thing I need to do is recompile the extracted and update src folder to a "JRE". I tried using javac, but didn't get anywhere. For example, I got the error that no source files were given. I am obviousely not using the right syntax to compile the JRE.
So, can anyone tell me, how do you end up with a working "JRE" folder containing a modified Java Runtime Environment based on the new source folder extracted from the JDK?
Note: I am not going to redistribute the compilation. It is for personal self use only.
Update: thanks to an answer and http://www.javalobby.org/java/forums/t103334.html I got to the following command: "c:\tmp\jdk1.6.0_17\bin\javac" -classpath "c:\tmp\out" -verbose -g -d "c:\tmp\out" -J-Xmx512m -cp "c:\jdk1.6.0_17\jre\lib\rt.jar";"c:\jdk1.6.0_17\lib\tools.jar" @files.txt - unfortunately, while it does seem to process things, when finished the output folder /out is empty. Is something wrong with my command?
Thanks in advance.
最满意答案
将类路径设置为提取源目录的顶部。 编译文件,然后将他们的.class文件放回rt.jar。
Set your classpath to the top of the extract source directory. Compile the files then place their .class files back in the rt.jar.
更多推荐
发布评论