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?

3
  • 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 docs.oracle.com/javase/tutorial/essential/environment/… for setting env variables Commented Jan 6, 2015 at 6:14
  • remove space.. there is no other reason that it should not work Commented Jan 6, 2015 at 6:16
  • For java please refer my anser; stackoverflow.com/questions/1672281/… Commented Jul 10, 2015 at 12:16

4 Answers 4

4

Don't put a space in your PATH entries

set "PATH=%JAVAHOME%\bin;%PYTHONPATH%;%PATH%" 
Sign up to request clarification or add additional context in comments.

Comments

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

1 Comment

For GUI way use this link so easy javatpoint.com/how-to-set-path-in-java
0

Have you tried removing the space after the semicolon

%JAVAHOME%\bin;%PYTHONPATH%; 

Comments

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.sstatic.net/N2C10.png]

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.