How to set up JAVA_HOME in window OS

Tram Ho

How to install JAVA_HOME on windows and see if my intellij has correctly pointed the java version yet?

  • Step 1: Download the java version to use here, run and install normally.
    • If the installation is successful, it will have these 2 directories:
  • Step 2: Set the environment variable JAVA_HOME
    • Icon window -> type: View advanced system settings -> enter
    • Choose Enviroment Variables …
    • Continue to choose: New …
    • Next step:
      • Variable name: JAVA_HOME
      • Variable value: is the path of your jdk directory above when java is installed
    • Continue: Double clicks on the path variable
    • Next: Choose new
    • Enter% JAVA_HOME% bin in the blinking area
    • Okiii done! Next check if the variable has been created yet
      • cmd
      • type: echo% JAVA_HOME%
      • The result appears the path I have installed above is successful offline:
    • Open inteliji select:
    • If not correct with the java version of your computer, select new …
    • Choose your java verison, you should not confuse pointing java ver for debug and run project!
    • That’s done! I wish you success! ^^
Share the news now

Source : Viblo