I have an jar called Myapp.jar.. It is working fine in java installed system.. And my task is to Bundle jre inside jar(Not along with jar(i.e we can put jre and jar in same folder to run a jar as given in following url http://www.mindfiresolutions.com/Run-jar-without-jre-on-windows-machine-76.php )). and I should not use any tools to convert jar into .exe file.. Because i have to give jar file only to client,in such a way that they can use this Myapp.jar in non java system also.. But,i dont know how to bundle jre inside jar.. Though i do bundle and all..I Dont how to run jre inside jar.. when ever we want to run jar,First of all,we must run our jre,then only we can run our jar.. Please provide me the solutions to bundle jre inside jar and how to run a jar? Thanks in advance....

Recommended Answers

All 3 Replies

This seems like a bad idea, even if it's possible. How will you handle essential security updates to the JRE?

Please provide me the solutions to bundle jre inside jar and how to run a jar?

Without unpacking the zip file and setting the appropriate paths? I doubt.

There is a free tool called launch4j which supports creation of launchers for JAR files and embedding a JRE (as mentioned on the home page) but you might have to do a bit of reading to get it to work (it requires you to create a XML file for its configuration). You might get some leads in this thread.

Thnx for reply dude..I did as you said by using launch4j to convert jar to .exe.. that will integrate jre itself.. But,am supposed to get jar file which is bundled with jre,not .exe file.. Is it possible to convert jar into executable jar using launch4j tool. if so,can you pls provide some url for it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.