Skip to main content

Is it possible to just build rt.jar?

3 replies [Last post]
jclingan
Offline
Joined: 2003-06-12
Points: 0

Is it possible to build only rt.jar without first building the entire JDK?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
schaefa
Offline
Joined: 2003-06-11
Points: 0

I guess the only way to build my rt.jar is to replace the old ".class" files with the new ones using for example Ant's JAR task with the update flag set to true.

So far that is what I would do:
- execute the Ant script in /src/j2se/make/sun/javac/ant
- create an Ant script that takes the generated code and updates the rt.jar with the new Java classes

As soon as I have that script done I will post it here.

Thanx - Andy

kellyohair
Offline
Joined: 2004-09-03
Points: 0

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.

The recommendation of just building the classes of interest and placing them in the bootclasspath before rt.jar is a good one.

-kto

mernst
Offline
Joined: 2005-02-19
Points: 0

John, why don't you just use a Java IDE and put the output path into the bootclasspath?

Matthias