0

I created .exe file from .jar file .Now my client demands to run the application without installing jre in the sytem.I have heard that with bundled jre it is possible ...but i dont know how to bundle jre with .exe file..

Guillaume Polet
  • 45,783
  • 4
  • 79
  • 115
Ram
  • 45
  • 2
  • 4
  • 8
  • Possible [duplicate](http://stackoverflow.com/questions/2258932/embed-a-jre-in-a-windows-executable). – Marc-Christian Schulze Oct 02 '12 at 07:16
  • 2
    or possible [duplicate](http://stackoverflow.com/questions/7071133/how-to-bundle-a-jre-with-launch4j) – Guillaume Polet Oct 02 '12 at 07:16
  • How will this application be delivered to clients? From the net, off CD, from USB Flash..? – Andrew Thompson Oct 02 '12 at 07:17
  • @coding.mof Sir converted .exe using install4J tool with jre bundled but application is not getting launched.. – Ram Oct 02 '12 at 07:20
  • @AndrewThompson from the off CD..Sir – Ram Oct 02 '12 at 07:21
  • *"off CD"* That is very limiting! I have two machines that run J2SE that can connect to networks, but only one that has a CD drive. And what about automatic updates to both your software, and the JRE? A net based source for an app. makes more sense in this disk-less, ..wireless, millennium. [JWS](http://stackoverflow.com/tags/java-web-start/info) can install Swing apps. direct from a link on the net to OS X, *nix and Windows desktop machines with Java. Speaking of which, there is a neat deployment script linked from the JWS info. page that checks for/helps upgrade the JRE. – Andrew Thompson Oct 02 '12 at 07:38

3 Answers3

0

The JavaFX is working on this. Here are the up-coming features in Java SE 7 u10:

https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7#3

https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7

Puce
  • 34,375
  • 9
  • 72
  • 137
0

I have used VMware ThinApp to do exactly what you are trying to do. It does cost money, but works extremely well. It allows you to roll up all the dependencies your application uses into a single executable that can then run on vanilla installations of Windows. It can be used for a lot more than just Java, and it does so by recording the changes you make to a system after installing your application + the JRE for example, and then wraps up all of those changes. It certainly simplifies application deployment, since the applications are now portable. I've even used it to roll up Visual C++ redistributables, and .NET as well. This certainly increases the size of the executable, but it's also convenient knowing the application will run successfully. See more info at http://www.vmware.com/products/thinapp/overview.html.

Consty
  • 1,712
  • 1
  • 14
  • 14
0

The open source Launch4j allows you to produce an exe with an embedded JRE. This SO article also discusses this topic. Caveat: I've had very good success with Launch4j, but never used the embedded JRE feature.

Community
  • 1
  • 1
Gene
  • 42,664
  • 4
  • 51
  • 82
  • i also created .exe using Launch4j with embedded jre but on running it is asking for the JRE from the internet – Ram Oct 02 '12 at 12:19
  • The SO link I posted talks about exactly this problem and how to fix it. Maybe this will get you to success. – Gene Oct 02 '12 at 21:22
  • Sir i made folder with bin and jre files .i placed .exe ,.jar and .xml file inside bin folder but its not working ...will u plz tell me where i am going wrong – Ram Oct 03 '12 at 05:22