How to install Java

 Some PCs might have Java already installed.

To check if you have Java installed on a Windows PC, search in the start bar for Java or type the following in Command Prompt (cmd.exe):


C:\Users\Your Name>java -version


If Java is installed, you will see something like this (depending on version):


java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)


If you do not have Java installed on your computer, you can download it for free at oracle.com.

Note: In this tutorial, we will write Java code in a text editor. However, it is possible to write Java in an Integrated Development Environment, such as IntelliJ IDEA, Netbeans or Eclipse, which are particularly useful when managing larger collections of Java files.


Setup For Window


To set up Java on a Windows system, follow these steps:

  1. Navigate to "System Properties," accessible through Control Panel > System and Security > System > Advanced System Settings.

  2. Under the "Advanced" tab, locate and click on the "Environment Variables" button.
  3. In the System variables section, find and select the "Path" variable, then click the "Edit" button.

  4. Press "New" and add the path where Java is installed, appended with "\bin." Typically, Java installs in C:\Program Files\Java\jdk-11.0.1 (unless specified otherwise during installation). If this is the case, add a new path: C:\Program Files\Java\jdk-11.0.1\bin.
  5. Click "OK" to confirm and save the settings.
  6. Finally, open Command Prompt (cmd.exe) and enter java -version to verify if Java is successfully installed on your machine.

    To set up Java on a Windows system, follow these steps:

    1. Navigate to "System Properties," accessible through Control Panel > System and Security > System > Advanced System Settings.

    2. Under the "Advanced" tab, locate and click on the "Environment Variables" button.
    3. In the System variables section, find and select the "Path" variable, then click the "Edit" button.

    4. Press "New" and add the path where Java is installed, appended with "\bin." Typically, Java installs in C:\Program Files\Java\jdk-11.0.1 (unless specified otherwise during installation). If this is the case, add a new path: C:\Program Files\Java\jdk-11.0.1\bin.
    5. Click "OK" to confirm and save the settings.

    6. Finally, open Command Prompt (cmd.exe) and enter java -version to verify if Java is successfully installed on your machine.


0 Comments