wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes path not working on win xp pro Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "path not working on win xp pro" Watch "path not working on win xp pro" New topic
Author

path not working on win xp pro

Rahul Dasgupta
Greenhorn

Joined: Jun 01, 2002
Posts: 20
Hello,
I just upgraded to win xp and set up the J2SDK 1.4.0 . I have set the path variable through the System properties-> advanced tab-> environment settings button.
When I tried to test this by typing java from my documents directory it works all right but not the javac command, to which it gives the error -
"'javac' is not recognized as an internal or external command, operable program or batch file."
when I type path then I get the following result -
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL3
2;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;
c:\borland\bcc55\bin; c:\j2sdk1.4.0_01\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\FSC
\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program File
s\Microsoft SQL Server\80\Tools\BINN; c:\borland\bcc55\bin; c:\j2sdk1.4.0_01\bin , so my path settings are apparently correct.
Why is this happening? Thanks for any help.
- rdg
P.S. I also am also unable to invoke the c++ compiler from 'my documents' folder, so I think this may be a problem with my path, but then how am i able to call the java.exe ?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\borland\bcc55\bin; c:\j2sdk1.4.0_01\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN; c:\borland\bcc55\bin; c:\j2sdk1.4.0_01\bin


Do you really have everything in your path twice or is that a typo?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rahul Dasgupta
Greenhorn

Joined: Jun 01, 2002
Posts: 20
It was not a typing error. I dont really understand myself why everything is repeated in the path settings.
In the environment variables the path setting for system variables contains the whole path once and it is again repeated in the user variables, so that may be the reason.
- rdg
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Add this to your PATH: 'c:\j2sdk1.4.0_01\jre\bin'
Rene


Regards, Rene Larsen
Dropbox Invite
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Rene Larsen:
Add this to your PATH: 'c:\j2sdk1.4.0_01\jre\bin'
Rene

I don't know if that fixed your problem, but you shouldn't NEED to do that. I think it has more to do with your "double path". Try removing the 2 instances, possibly by clearing up your USER PATH setting, and see if that doesn't help.
Let us know. Or let us know if you got it working before this post.


GenRocket - Experts at Building Test Data
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
but then how am i able to call the java.exe ?
You're possibly invoking Microsoft's java.exe or Sun's JRE installation.
Maybe try editing out the spaces towards the end of the path setting.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
If you have CLASSPATH set in your System environment variables, you do not need to set it in the User environment variables.
Rahul Dasgupta
Greenhorn

Joined: Jun 01, 2002
Posts: 20
Hello everyone,
I have moved my java directory to the start of my path settings, deleted the spaces and deleted the path settings in the user variables, and now it is working fine.
Thanks for all help.
- Rahul.
Marius BONG
Greenhorn

Joined: Dec 16, 2001
Posts: 13
hi everyone,
mmmhhhh, can i know how to set the path ?? which file is that in??and what else do i have to change so i can compile and run java in any directory?
Thanks for your help.
Marius BONG
Greenhorn

Joined: Dec 16, 2001
Posts: 13
i'm using win XP too.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Marius,
System Control Panel -> Advanced Tab -> Environment Variables -> Look for one named "Path" and edit it or create a new one named "Path" with the value that you want.
Or, you could edit the autoexec.bat file in the root of your c drive to define the path setting.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: path not working on win xp pro
 
Similar Threads
Compiler Error Version Problem
classpath
Problem while installing Enthuware
Program: Change Due/Tendered
Wrong version appearing for "java" command