• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

path not working on win xp pro

 
Rahul Dasgupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rahul Dasgupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add this to your PATH: 'c:\j2sdk1.4.0_01\jre\bin'
Rene
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm using win XP too.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic