简体   繁体   中英

How do i compile .jar with jre?

I have a friend without java. I want to package my executable .jar file with java platform SE binary in an exe file so he can run it without downloading the entire java runtime. Could someone point out some kind of software that does that?

I have a friend without java.

And you call them a friend? ;)

  • Use deployJava.js to check the user has the minimum Java required to run the app.
  • Install & launch the app. using Java Web Start .
  • Give the user a link to the 'launch' web page.

This will work on Windows ..and OS X ..& *nix.

Try using Launch4J at http://launch4j.sourceforge.net/

Here's the highlights:

Launch4j wraps jars in Windows native executables and allows to run them like a regular Windows program. It's possible to wrap applications on Windows, Linux, Mac OS X and Solaris!

Also creates launchers for jars and class files without wrapping.

I have also had good experiences with Launch4j. Also check out JSmooth: (http://jsmooth.sourceforge.net/index.php) which claims to have an option to download and install a JVM if one is not available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM