Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a java program as an exe in Windows without JRE installed

Tags:

java

windows

I want to run a java program as an exe in Windows. The windows box doesn't install java at all...

So, is there any other way in which the java program can be converted to an exe which removes the need for a dependency on the JRE?

like image 937
siva Avatar asked Aug 26 '09 05:08

siva


3 Answers

You can use Excelsior JET compiler for that purpose.

See http://www.excelsiorjet.com/ for more information on this.

like image 144
Vanya Avatar answered Oct 27 '22 22:10

Vanya


You can ship the JRE with your application and use that JRE for your application. The effect is the same: The application will be started through an executable (wrapper needed) or script (batch) file and the target machine does not need to have a java runtime installed.

Java doesn't have to be 'installed', it just has to be 'present'.

like image 27
Andreas Dolk Avatar answered Oct 27 '22 22:10

Andreas Dolk


For the application to run you will need the runtime. In fact the very first thing that happens when you start the app is a call is a made to OS to start JRE. You cannot do without JRE.

[You can of course embded JRE into your app itself if you want].

like image 42
Sesh Avatar answered Oct 27 '22 22:10

Sesh