web analytics

Java Environment Setup

In this section we will describe the process to setup Java on your local machine.

Option 1 setting path to use javac compiler:

You can write java program in any text editor, compile it using javac command and run by java command on command line. To install java environment go to here and follow the instructions. For windows operating system download latest jdk version install it and setup path as follows:

Assuming you have installed Java in c:\Program Files\java\jdk directory −

        • Right-click on ‘My Computer’ and select ‘Properties’.
        • Click the ‘Environment variables’ button under the ‘Advanced’ tab.
        • Now, alter the ‘Path’ variable so that it also contains the path to the Java executable. Example, if the path is currently set to ‘C:\WINDOWS\SYSTEM32’, then change your path to read ‘C:\WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin’.

Option 2 using an IDE

use the IDE and leave the rest to IDE to set java path. Following are some popular java IDEs you can freely download and use to write and compile the java programs.