Register Login

Install Java SDK and Set JAVA_HOME Environment Variable

If you want to develop applications in Java, you have to download and install the Java JDK (Java Development Kit). This is a software package where you can create and run your Java applications. This JDK can be run on different operating systems such as Windows, Linux and macOS.  

In this tutorial, we will explain,

  • How to Install Java SDK
  • How to set Java Environment Variables java_home
  • How to update the Java system variable or java path

How to install Java JDK?

  1. The first step is to download the Java JDK. For that, visit the official website of Oracle and download Java SDK 1.4 from this link  - https://www.oracle.com/in/java/technologies/javase-downloads.html
     
  2. Install Java Run Time using (j2sdk-1_4_2_11-windows-i586-p.exe) file

  1. Double click on the j2sdk-1_4_2_11-windows-i586-p.exe. Wait for a few seconds then the following screen will appear -  

  1. Select I accept the term in the license agreement. Click on Next > button
  2. In the following screen, check whether the drive location is correct (c:\j2sdk-1_4_2_11\). Then, click on Next

  1. On the next screen, click on Install

  1. Now Java run time will start installing. After the installation is completed, click on Finish
  2. If you are asked to restart the system, do so

Setting JAVA_HOME Environment Variable

  1. Right-click on My Computer and click on Properties

  1. A System properties screen will appear. Click on the Advanced tab and then click on Environment Variables

  1. The Environment Variables box will appear

  1. In the User variables for Administrator section, click on the New button. Then, type the following in the New User Variable box that appears -
  • Variable name:  java_home
  • Variable value: C:\j2sdk1.4.2_11 (path of java directory where you have installed Java)
  1. Click on OK

Updating Java system variable or java path

  1. Open the Environment Variables window using the steps mentioned earlier. Under the System variables section, select Path and then click on Edit
  2. On the Edit System Variable box, type the following –

Variable value =; C:\j2sdk1.4.2_11\bin (go to the end of the string and update this  value. Please don’t delete any entry)

  1. Click on OK


  1. Close the System Properties screen by clicking on OK

Your Java path will have been updated successfully.

Conclusion

After following all the steps properly, you can restart your system for the changes to take effect. If you are having any issues regarding any of the steps, please comment down below.