Setting up enviromental variables in Windows 10 to use java and javac

后端 未结 7 1368
再見小時候
再見小時候 2020-11-30 23:36

I got a new laptop with Windows 10 and I want to set it up so I can use java and javac from the command line.

I have searched online but al

7条回答
  •  余生分开走
    2020-12-01 00:11

    Just set the path variable to JDK bin in environment variables.

    Variable Name : PATH 
    Variable Value : C:\Program Files\Java\jdk1.8.0_31\bin
    

    But the best practice is to set JAVA_HOME and PATH as follow.

    Variable Name : JAVA_HOME
    Variable Value : C:\Program Files\Java\jdk1.8.0_31
    
    Variable Name : PATH 
    Variable Value : %JAVA_HOME%\bin
    

提交回复
热议问题