Switch JDK version in Windows 10 cmd

前端 未结 4 1105
北恋
北恋 2021-02-04 09:32

Is there a way to change JDK version easily in cmd? like the version on mac. Change Default JDK on Mac.

4条回答
  •  野性不改
    2021-02-04 10:08

    In "System Properties" window, click “Environment Variables…” and select PATH by click on Edit, then "New" and type ;%JAVA_HOME%\bin

    It will write the JAVA_HOME defined. Just to edit one time.

    And after you define JAVA_HOME by the cmd commande : set JAVA_HOME = path_of_jdk_or_jre whenever you want.

提交回复
热议问题