setting environmental variable in windows using cmd

前端 未结 1 1652
忘掉有多难
忘掉有多难 2021-01-14 21:35

To start the my project in windows i have to set the java environmental variable in cmd using below command

set JAVA_HOME = D:\\Java\\jdk1.7.0
1条回答
  •  不思量自难忘°
    2021-01-14 21:48

    The set command is aware of spaces. When you issue the command

    set JAVA_HOME = D:\Java\jdk1.7.0
    

    you actually set the variable JAVA_HOME␣ to value ␣D:\Java\jdk1.7.0. Note the spaces: !

    You can check it using the following way:

    > echo [%JAVA_HOME%]
    [%JAVA_HOME%]
    > echo [%JAVA_HOME %]
    [ D:\Java\jdk1.7.0]
    

    The brackets are included in order to highlight spaces, they are not important by themselves.

    0 讨论(0)
提交回复
热议问题