Saturday, May 14, 2011

Start your Java - installation

To run a Java program, you will need to have Java Vuirtual Machine (JVM) installed on your machine. It can be downloaded from Oracle website, http://www.oracle.com/technetwork/java/javase/downloads/index.html

Upon opening the link, you will see a couple download sections. For the most basic setup, the "Java Platform, Standard Edition" is the one you are looking for. There are two download options here, JDK and JRE. If you are just going to run Java programs on your machine, JRE (Java Runtime Environment) is the one. If you will be doing Java development, you will need to get JDK which includes Java compiler to compile your code and JRE. So if you have already download JDK, you don't need another JRE.

Once installation is completed, the executables are ready to run. On Windows, they can be found in C:\Program Files\Java\jdk1.x.x_xx\bin by default. But for your convenience, it's better to add the path to the environmental variable PATH (having Java available to environment is required if you are going to use some development tool like Eclipse).

To verify the installation, open the command prompt and type "java -version" or "javac -version" (if JDK was installed). You should see the software version number returned by the program.