How to Install Java? How to set Paths in Java?

Step-1:
Download the JDK From official website is:
 and click on JDK download button for latest version

Step-2:
  1. click on Accept License Agreement. 
  2. click the Download link that corresponds to the .exe for your version of Windows.


Step-3:
  1. Run the JDK Installer .exe file
  2. Start the JDK 11 installer by double-clicking the installer's icon or file name in the download location.
  3. Follow the instructions provided by the Installation wizard.
  4. once installation is complete click on Close.

For setting the permanent path of JDK, you need to follow these steps:
    1. Open Advanced System Settings
    In Windows 10 press Windows key + Pause Key, This will open the System Settings window. Go to Change settings and select the Advanced tab.
    Alternatively:
    Open “Windows search” – you will find it next to the Windows logo
    open Windows10 search
    open Windows 10 search
    1. In the search field type in – advanced system settings
    2. Click on the match on top of the list
    Search for advanced system settings
    Search for advanced system settings in Windows 10
    2. Set JAVA_HOME Environment variable
    In “System Properties window” click on  “Environment Variables…”
    system properties window environment variables
    system properties window environment variables
    Under “System variables” click on the “New…” button and enter JAVA_HOME as “Variable name” and the path to your Java JDK directory under “Variable value”
    Add JAVA_HOME as system variable
    Add JAVA_HOME as system variable

    3. Update System PATH

    1. In “Environment Variables” window under “System variables” select Path
    2. Click on “Edit…”
    3. In “Edit environment variable” window click on “New”
    4. Type in  %JAVA_HOME%\bin
    Update system path
    Update system path

    4. Test your configuration

    Open a new command prompt and type the command and enter it:
    1. echo %JAVA_HOME%
    this will print out the directory JAVA_HOME points to or empty line if the environment variable is not set correctly
    Now type type the command and enter it:
    1. javac -version
    this will print out the version of the java compiler if the Path variable is set correctly or “javac is not recognized as an internal or external command…” otherwise
    Test JAVA_HOME and system path
    Test JAVA_HOME and system path

    Comments

    Popular posts from this blog

    What is char charAt (int index) in Java, and how can I use it?

    What is the alert log?