Windows Server 2003
1833016 Members
2859 Online
110048 Solutions
New Discussion

Re: PATH Setting issue

 
Prasad BS
Occasional Contributor

PATH Setting issue

There is issue in setting the PATH enviornment variable in Windows 2003 server.

Here are the details ,

In My Computer - > Properties - > Advanced ->Environment Variables - > System Variables

I have defined ,

J2SDK = C:\Program Files\Java\jdk1.5.0_11

Then i login to command prompt - > issue the below command.

echo %J2SDK%
C:\Program Files\Java\jdk1.5.0_11

echo %path%
C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WIND
System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN

Then i will be executing a command file extension (.cmd ) in which there are few Project related enviornment variables which are setting correctly.
But the below command in the same cmd file to set the PATH.

set PATH=%PATH%;.;%J2SDK%\bin;%J2SDK%\jre\bin\client.

Is not setting the PATH corrrectly.

After this if issue

echo %path%
C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\
System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;.;C:\Program\b
in;C:\Program\jre\bin\client

You can see the J2SDK is not set correctly from above echo command.

It always says
"C:\Program\bin" - > instead of "C:\Program Files\Java\jdk1.5.0_11" also ,

"C:\Program\jre\bin\client" - > instead of "C:\Program Files\Java\jdk1.5.0_11\jre\bin\client"

Can anyone help on this.

Thanks
Prasad
5 REPLIES 5
Steven Clementi
Honored Contributor

Re: PATH Setting issue

You can try 2 things...

1. J2SDK = "C:\Program Files\Java\jdk1.5.0_11"

or

2. J2SDK = C:\Progra~1\Java\jdk1.5.0_11


Steven
Steven Clementi
HP Master ASE, Storage, Servers, and Clustering
MCSE (NT 4.0, W2K, W2K3)
VCP (ESX2, Vi3, vSphere4, vSphere5, vSphere 6.x)
RHCE
NPP3 (Nutanix Platform Professional)
Prasad BS
Occasional Contributor

Re: PATH Setting issue

I tried your suggestion but it didn't solve the problem.

But I noticed when I run the command file after ,

In My Computer - > Properties - > Advanced ->Environment Variables - > System Variables

The J2SDK will be set back to below one again.
J2SDK = C:\Program Files\Java\jdk1.5.0_11

Any other suggestions.

Thanks
Prasad
Steven Clementi
Honored Contributor

Re: PATH Setting issue

It works just fine on my Vista Desktop.

Going to try on a 2003 machine in my lab.


It might be a 2003 issue. (2003 or older).

What service pack are you running? if any?


Steven
Steven Clementi
HP Master ASE, Storage, Servers, and Clustering
MCSE (NT 4.0, W2K, W2K3)
VCP (ESX2, Vi3, vSphere4, vSphere5, vSphere 6.x)
RHCE
NPP3 (Nutanix Platform Professional)
Prasad BS
Occasional Contributor

Re: PATH Setting issue

The platform is windows 2003 Server SP2.

-Prasad
Prasad BS
Occasional Contributor

Re: PATH Setting issue

Forgot to mention one more thing , it works correctly in Windows Xp also.

-Prasad