简体   繁体   中英

How to run .exe file converted from .jar file using Launch4J tool without Jre

I converted my jar file into .exe using Launch4J. Now as per my need I have to run this exe file on system with no JRE installed. Is it possible to run .exe file converted from jar file without JRE or is there any way to embed JRE with the .exe file?

the exe is just a facility to run the program on windows, it is also needed the JRE.

[]'s

I think you don't need JRE for running a .exe file.But if you create a .exe file from a jar file, you should have JAVA in your system or in any other PC you want to run the .exe file. So JRE comes with the JAVA when installed(only basic thing). I think you can include JRE by using launch4j. I used it long back ago. But I won't personally recommend it. I always use Jar2EXE for converting the jar file to an .exe file.

  1. it's not possible to run the exe without JRE (since the exe is just wrapper of jar)
  2. I would suggest you to use a setup tool to create an Installer. It's the easiest way. Launch4j is not capable of putting JRE into exe, so you would have to send 2 parts (exe + JRE). However if you create an Installer, you'll have just 1 exe file where you have packaged everything. I'd recommend Inno Setup Compiler.

I don't know with Launch4J.

But you can do it with NetBeans and a couple of tools. The result is a standalone installer that packages everything you need (included java files), so your software can run without installing JRE. But in the end it does need JRE to run, only that everything is included, and it's totally portable. here is this solution

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