Java can be installed to any computer despite of the operating system. The reason behind this fact is the cross-platform nature of this programming language.
There are 2 main steps in installing Java.
- Downloading Java JDK
- Configuring Java in the computer (normally for windows)
You can download Java from there web site.
There you have to select the defined Java JDK for your Operating System.
After downloading Java, open command prompt(in windows) or terminal(in Linux) and type “Java” and press enter.
For Linux the configurations will be automatically configured but for windows you have to configure manually.
Configuring Java in Windows
- Right click on My computer icon and select the option “Properties”.
- In the left corner, you will find a topic named “Advanced System Settings”
- Click “Environment Variables” there and in the “System Variables” section, click for the “Path” variable and click “edit”.
- Then copy and paste the path of the “Javac” you have downloaded.
- Normally the path will be like :
- Remember that you have to separate the previous path with the new path by a semi colon. (;)
- Then click “OK” in all the boxes poped up.
Now Java is ready to run in your computer.
In the next tutorial we’ll discuss about “Variables” in Java and how to work with them.