Reputation: 11107
I am going to create a Desktop application in Java. I don't know whether user having JAVA VIRTUAL MACHINE or not.
My questions are:
I want to know whether its possible to run Java application in a machine that doesn't contains JVM.
If its possible, I want to know whether this case is possible, I will created a application say MyApps, I will to convert this as .exe file and if user clicks MyApps.exe it should run my Java application and install JVM and run in that machine.
Upvotes: 2
Views: 319
Reputation: 11107
Finally I got the solution for running my Java application without Java Virtual Machine, by bundling JRE in the exe file. I did this by using the following link.
It's really working awesome.
JAVA without JVM using Launch4J
If we maintain the Directory Path as given we can get .exe with JRE bundled that will run without JVM.
Upvotes: 0
Reputation: 36229
Use webstart, and to install java automatically, see the great comment of Andrew Thompson.
Upvotes: 3
Reputation: 10417
Nope, you need a JVM to run the Java bytecode. The only solution would be to transform the bytecode into a different executable format.
Upvotes: 0
Reputation: 533530
This is not completely pointless as many system have some version of Java but may not have the version you need.
Upvotes: 1