We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

Every Java application requires JRE/JVM to run but not every user may have the virtual machine installed on her/his machine. One cannot expect every user to be smart enough to download and install JRE by reading instructions. There are a couple of approaches that a Java developer could take to make sure that her/his application works even if the JRE is not installed on the user's system.

These approaches are enumerated as below.

  1. Use any Open source intaller generator in java, which can run without JVM like launch4j. Installer will take the jar file and generate the .exe file and then bundle JRE with the application.

  2. Run jar through a batch file-

a. Create a new folder and place the jre folder and the executable jar file within it.
b. Next, create a batch file in the same folder.
c. Finally, add the following code to the batch file and save it.

         jre\bin\java.exe -jar installer.jar

Now the jar file can be executed through the batch file and the .exe file.


Related Tags:

Java, JRE/JVM

Author: Prem Chand Mali

top

Related Pages

  • Sub Link2

Java

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login