How can I set the PATH variable for javac so I can manually compile my .java works?

前端 未结 9 2166
再見小時候
再見小時候 2020-12-01 23:44

Here\'s the address on my drive:

C:\\Program Files\\Java\\jdk1.6.0_18\\bin

How would I go about setting the path variable so I c

9条回答
  •  悲哀的现实
    2020-12-02 00:26

    That would be:

    set "PATH=%PATH%;C:\Program Files\Java\jdk1.6.0_18\bin"
    

    You can also append ;C:\Program Files\Java\jdk1.6.0_18\bin to the PATH in the user environment dialog. That would allow you to use javac and other java tools directly form any cmd shell without setting the path first. The user environment dialog used to be somewhere in the system properties in XP, I have no idea where it is in Windows 7.

提交回复
热议问题