Jaipal
Jaipal

Reputation: 167

How to make an exe file to run in all systems which don't having JVM?

I recently developed an desktop application using java....i made .exe file using launch4j... It gets executed on machines that have only JVM... Propose me a way to make it executable on machines that don't have JVM

Upvotes: 1

Views: 137

Answers (2)

Karol S
Karol S

Reputation: 9432

I use WinRun4J

You just copy the entire JVM to your program's directory and create an .ini file with contents similar to these:

main.class=com.program.Main working.directory=. classpath.1=.\lib\*.jar vm.location=.\jre7\bin\client\jvm.dll

where jre7 is the directory with copied JRE.

Be aware that you need to check if you abide by JRE's licence.

Upvotes: 0

Cirou
Cirou

Reputation: 1430

You can use Excelsior JET to compile Java into a native executable file on Windows that doesn't depend on the JRE.

Another solution could be GCJ

Upvotes: 1

Related Questions