how to install java

ww‮ttual.w‬uri.com
how to install java

To install the Java Development Kit (JDK) on your system, you will need to follow a few steps that depend on your operating system and the version of Java you want to install. Here is a general outline of the steps you will need to follow:

  1. Download the JDK from the Oracle website (https://www.oracle.com/java/technologies/javase-downloads.html). Make sure to download the JDK, not the Java Runtime Environment (JRE).

  2. Install the JDK by following the instructions provided in the installation wizard or the installation instructions provided with the JDK. The exact steps will vary depending on your operating system.

  3. Set the JAVA_HOME environment variable to the path of the JDK installation. This will allow other programs to find the JDK on your system.

  4. Add the bin directory of the JDK installation to your PATH environment variable. This will allow you to run the java and javac commands from any directory.

Here are some more detailed instructions for installing the JDK on specific operating systems:

  • Windows: To install the JDK on Windows, download the JDK installation executable file from the Oracle website and double-click it to start the installation wizard. Follow the instructions provided in the wizard to complete the installation. Once the JDK is installed, you will need to set the JAVA_HOME environment variable and add the bin directory of the JDK installation to your PATH environment variable. You can do this by following these steps:
  1. Right-click on the This PC icon and select Properties.
  2. Click on the Advanced system settings link.
  3. Click on the Environment Variables button.
  4. Under the System Variables section, scroll down and find the JAVA_HOME variable. If it doesn't exist, click the New button to create it. Set the value of the JAVA_HOME variable to the path of the JDK installation, such as C:\Program Files\Java\jdk1.8.0_251.
  5. Under the System Variables section, find the Path variable and click the Edit button.
  6. Click the New button and add the bin directory of the JDK installation to the Path, such as C:\Program Files\Java\jdk1.8.0_251\bin.
  7. Click OK to save the changes and close the windows.
  • Mac: To install the JDK on Mac, download the JDK installation package from the Oracle website and double-click it to start the installation wizard. Follow the instructions provided in the wizard to complete the installation. Once the JDK is installed, you will need to set the JAVA_HOME environment variable and add the bin directory of the JDK installation to your PATH environment variable. You can do this by following these steps:
  1. Open the Terminal application.
  2. Run the following command to open the bash_profile file in a text editor:
nano ~/.bash_profile
  1. Add the following lines to the file to set the PATH.
export PATH=$PATH:/usr/local/java/jdk/bin
Created Time:2017-11-01 20:42:56  Author:lautturi