tags:

views:

289

answers:

2

How can i bundle a stripped down JVM to run just my application?

i would like to strip down the JVM so that i can include it in my application. I know that exe wrappers can do this but what i would like to know is how? so that i can script it and create bundles for multiple OS's not just Windows.

A: 

This may not be quite the answer you're looking for, but you can create platform independent executable JAR files quite easily in Eclipse, or almost as easily manually. These are quite slick to work with and function just fine on any computer with Java2 (that is 1.2, or in other words, everyone) installed. Just double click and it runs, just like an exe.

dimo414
+2  A: 

Even though it might be possible to strip down the JRE distribution from a technical perspective, please have a close look at the license agreement. For Java 6 it states:

[...] Sun grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software, provided that (i) you distribute the Software complete and unmodified and only bundled as part of, and for the sole purpose of running, your Programs [...] {Supplemental License Terms, (B)}

I'd read it like that: you're only allowed to distribute a complete (Sun) JRE 6 (or JDK 6).

Andreas_D