开发者

How to set PATH to use Java and Python simultaneously

I was just wondering if there was any way to set to %PATH% variables so I can compile my Java code, along with my Python code?

For instance.. PATH is currently C:\ ... JDK_bin blah blah开发者_开发百科, and that's it. To run my python code, I have to change my path variable completely.

Any answers?


Just add a semicolon after your present path, and write the new one after that.

set PATH="C:\Program Files\Java\blah\blah";C:\Python31\;C:\Windows\System32

etc...


You need to add the path to python exe to your existing PATH variable which already has path to Java exes and many more paths in it.

path = %PATH%;C:\path\to\python\bin

You can also do this using windows GUI.

Note that doing an absolute assignment to PATH like

set PATH = C:\path\to\python\bin

will overwrite it, loosing the path(s) it already had.


PATH variables can have multiple paths in them. Separate paths with ; on Windows and : on *nix.

set PATH=c:\path\to\java;c:\path\to\python
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜