Wednesday, December 23, 2009

How To Run A Jar File

First of all, if you don't have it yet, you have to install a JVM/JRE on your machine. Surely, you might also install other versions of Java such as a JDK. But it contains more than you need to run a java program. How to find it out whether a JVM is installed ? In Windows machine, just open a command window and type "java -version". Got an answer like this:

java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)


then you already have a JVM. Other answers would require a fresh installation of a JVM. In that case you might visit Java download page from Sun Microsystems, download and install it on your machine.

Recent Sun's JVM/JRE installation would automatically associate Jar files with itself. This case, all you have to do is to double click the corresponding files. Previous & older install systems might require manual file association. You might want to read this or this article to help you further.

No comments:

Post a Comment