Java is freely available on Oracle's Website. Download the latest version of JDK (Java Development Kit) on your machine. Install JDK on your machine. Once you have installed Java on your machine you would need to set environment variable to point to correct installation directory
Setting Up Path for Windows(2000/xp,Windows7,8)
Step1:install Java in C:\ Program files/ Java / JDK directory
Step 2: Go to the Advance System Settings tab.
Step 3: Click on Environment Variables button.
Step 4: Now alter the path variable so that it also contains the path to JDK installed directory.
For e.g:- Change C:\windows/ system 32. to C:\windows/system 32; C:\program files / Java/ JDK.
Setting Up Path For LInux,Unix,Solar:
Environment variable PATH should be set to point to where the Java binaries have been installed.Refer to your shell documentation, if you have trouble doing this.
Example: if you use bash as your shell, then you would add the following line to the end of your
'bashrc: export PATH = /path/to/java:$PATH'
Popular Java Editors:
To write your Java programs, you will need a text editor. There are even more sophisticated IDEs available in the market. But for now, you can consider one of the following −
Notepad − On Windows machine, you can use any simple text editor like Notepad, TextPad.
Netbeans − A Java IDE that is open-source and free which can be downloaded from https://www.netbeans.org/index.html.
Eclipse − A Java IDE developed by the eclipse open-source community and can be downloaded from https://www.eclipse.org/