tags:

views:

46

answers:

1

I want to ship an open source Java project with its own JRE so that it doesn't depend on whether one is installed or not.I will have everything in one directory and my program will be the sole user of that jvm and class library. As Java is now open source, I think I can now legally strip down the class library (rt.jar) to only classes I need. For example I don't use any SQL so I don't want to burden the download with classes in the java.SQL package. This would be somewhat analogous to a linking step when an executable is built from libraries using only methods in the call tree that starts with the programs main(). Does anyone know what tools I might use to do that. Is it possible?

+1  A: 

I think this is pretty much already done in Java 6 update 10.

It was planned for Java 7 but it shipped before.

It is the Java Kernel here are the details, I'm not quite sure if is what you need.

Here are the links:

http://tech.puredanger.com/java7/#kernel

http://weblogs.java.net/blog/chet/archive/2007/05/consumer_jre_le.html#JavaKernel

Here is other:

http://java.sun.com/javase/6/6u10faq.jsp#JKernel

OscarRyz