1

Possible Duplicate:
(Java) jar to exe

What if i want to run a .jar program on a pc that doesnt have the JDK...?

would it possible?

Community
  • 1
  • 1
wam090
  • 2,823
  • 8
  • 33
  • 36

2 Answers2

3

Options include:

  • Include the Java Runtime Enviroinment (JRE) in your installer. This is probably the simplest option.
  • Include the JRE ''and'' Wrap your application in a small, native executable launcher. Exe4J makes this easy for MS Windows.
  • Compile your Java code to native executable. I haven't done this myself. A company claiming to support this is Excelsior; they have a comparison of approaches here.
Andy Thomas
  • 84,978
  • 11
  • 107
  • 151
0

If you have a site to distribute the app. from, JWS and deployJava.js are a better alternative to creating an EXE.

JWS will work on any platform with Java 1.4+, and the deployJava.js will help ensure the JRE is installed.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433