0

I can't use Java and Python at the same time.

When I set

%JAVAHOME%\bin; %PYTHONPATH%; 

I can use java, but not python. When I set

%PYTHONPATH%; %JAVAHOME%\bin;

I can use python, but not java.

I'm using windows 7. How can I go about fixing this problem?

royhowie
  • 11,075
  • 14
  • 50
  • 67
Roy Lee
  • 329
  • 1
  • 2
  • 12
  • 1
    Instead of setting path for java and python, just set environment variable for java and python will work fine, you don't have to set environment variable for python. Visit http://docs.oracle.com/javase/tutorial/essential/environment/paths.html for setting env variables – Gaurav Dave Jan 06 '15 at 06:14
  • remove space.. there is no other reason that it should not work – DevC Jan 06 '15 at 06:16
  • For java please refer my anser; http://stackoverflow.com/questions/1672281/environment-variables-for-java-installation/31340459#31340459 – hitesh141 Jul 10 '15 at 12:16

4 Answers4

4

Don't put a space in your PATH entries

set "PATH=%JAVAHOME%\bin;%PYTHONPATH%;%PATH%" 
Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249
0
  1. Select Start, select Control Panel. double click System, and select the Advanced tab.
  2. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. ...
  3. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable.

for more use this link

http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

Dilip
  • 2,622
  • 1
  • 20
  • 27
0

Have you tried removing the space after the semicolon

%JAVAHOME%\bin;%PYTHONPATH%; 
SebS
  • 571
  • 3
  • 6
  • 16
0
Select Start, select Control Panel. double click System, and select the Advanced tab.
Click Environment Variables. In the section System Variables or User Variable, find
the PATH environment variable and edit it.and write the path of your compiler like this way:

Assume that your
 java compiler path is:D:\java\bin
 python compiler path is:C:\python27
 so you have to set your User or System like variables like this:

Variable name:PATH
Variable value:D:\java\bin;C:\python27

You don't have to leave any space between the paths and you can add as many 
path as you want

Have a look at this:[https://i.stack.imgur.com/N2C10.png]
Anurag Goel
  • 468
  • 10
  • 15