Surprisingly enough I couldn't find the answer to this question.
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.
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).
Thanks.
You have better chances using OpenJDK (the base of Oracle/ Sun's future JDKs). http://openjdk.java.net/
But what do you want to change actually? Maybe there is a better way...
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.
Taken from: http://www.java.net/forum/topic/jdk/java-se-snapshots-project-feedback/it-possible-just-build-rtjar
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)
Also have a look at this: Where to get full source code for rt.jar?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With