Run java application without installing the java on target machine

716 Views Asked by At

I have created a Java application and made an installer for various platform. It works fine with me, but when it comes to the other machine, it requires Java to be installed on the target machine to run the Java application. For the Windows installer I created the .exe file with the help of Inno Setup and Launch4j, and included the JRE into the installer.

I want to run my Java application on the other Windows machine without installing Java. I need help to solve my problem.

2

There are 2 best solutions below

1
sanjeevRm On

you can do it using Launch4j http://launch4j.sourceforge.net/ Launch4j wraps jars in Windows native executables and allows to run them like a regular Windows program

0
Sujay Bawaskar On

Looks like you are looking for native vm. Solution like GraalVM may help here. With GraalVM you can bundle your distribution as an executable.

https://www.graalvm.org/docs/getting-started/windows/

For Java native image take a look at,

https://www.graalvm.org/docs/getting-started/#native-images