Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the path

Status
Not open for further replies.

LittleRedHat

Instructor
Apr 20, 2001
202
GB
I thought I'd done everything right ... but obviously not! :-(

Using Win2k ...

At the command prompt this works fine
c:\Java>c:\jdk1.3.1\bin\javac Hello.java

I've tried to set the path via System Variables as
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\jdk1.3.1\bin

but unless I still include "jdk1.3.1\bin\" the "The name specified etc" error message is returned.

I would be grateful if anyone could point out the error of my ways!

TIA

LRH
 
Have you checked that your system root is defined:

echo %SystemRoot%

You can also verify by checking your path:

echo %PATH%

You can easily set your environment path in Win2k by going to control panel > system > advanced > environment variables. Setting the variables here will apply to all the command prompt windows you open.
 
Thanks for your reply.

When I set the path as

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\jdk1.3.1\bin

I did it via control panel > system > advanced > environment variables, adding the ";c:\jdk1.3.1\bin" on to the end of the existing "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem"

Have as you suggested tried

echo %SystemRoot% which returns C:\WINNT

and

echo %PATH%, which returns ;C:\WINNT;C:\WINNT\System32\Wbem;c:\jdk1.3.1\bin

Does that give any clues as to why it still requires the path including at the command prompt to run javac?

Thanks again.

LRH
 
Hmmm, everything looks correct. YOu should be able to type:

javac Hello.java

and have everything work fine.Make sure that there isn't a typo in your path setting in control panel (i.e. that you didn't type lower case L instead of one).
 
Thanks for confirming that (in theory + mutliple checks for typo's!) I seem to have done everything right after all. I was beginning to doubt my sanity!

Guess I'll have to put the problem down to one of Window's many little mysteries and keep my fingers at the ready for a little extra typing. LOL

Best regards

LRH
 
Thanks for your note. That was my starting reference!

I guess I could contact them direct to see if they can throw any light on the problem. Might get round to it at some stage, but for the moment I've settled for a shortcut to the path on my desktop and pasting it in.

With thanks again ...

LRH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top