Link to home
Start Free TrialLog in
Avatar of diek_nf
diek_nfFlag for Canada

asked on

Classpath and Path - Looking for Mr or Ms Clear Explanation

Hi,
What is the difference between the path and classpath? I am trying use Choice.exe from the windows resource kit,in a batch file and I want to add it to the path classpath. Which one and why? Thank you,
diek
ASKER CERTIFIED SOLUTION
Avatar of lpenrod
lpenrod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi diek_nf. You can also do it this way. Open My Computer > Properties > Advanced > Enviroment Variables. You will see two lists "User Variables for ..." and "System Variables". Under each you should see in the list "PATH" double click it from the list you want to add the path. Note there are probably several paths already listed. First see if the path you want to list is already listed. Second if it is not then add the path starting with the semicolon ; and then the path at the end of the path line.

Here is a samplie of my System Variables Path

C:\DEVELO~2\Delphi\DELPHI~2\Projects\Bpl;C:\DEVELO~2\Delphi\DELPHI~2\Bin;C:\Development\Delphi\DELPHI~1\Projects\Bpl;C:\Gblware\sqlany;C:\Development\Delphi\DELPHI~1\Bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\


The Crazy One
Avatar of diek_nf

ASKER

Guys,
Thanks. Just a little background, I am somewhere between beginner and advanced in NT knowledge. NT is an everyday learning experience, knowledge gained in part by this site. So....

Ipenrod,
Is classpath only used in java? I had Oracle installed, and I seem to recall seeing that in the Classpath.

Guys,
So if I want programs to be available at the command prompt, i have to add them to the path variable? Crazy for example has C:\Program Files\Support Tools\. To house his favorite command line utilities???

I look fwd to hearing back fro u guys,
diek
>>>So if I want programs to be available at the command prompt

In a manner of speaking. All this really does is let you enter the name of the exe of bat or com file to run instead having to enter the enitre path from the command line. Lets say you put your choice.exe in the C:\Program Files\Support Tools\. Now you get to a commmand prompt and type in choice.exe then this should run the exe. Otherwise you would have to enter it this way C:\Program Files\Support Tools\choice.exe.    
Avatar of lpenrod
lpenrod

I am only familiar with classpath in the context of java.  It is entirely possible that it is used for anything that wants to.

Yes, if you try to launch an executable from the command line, the system looks for it first in the current directory and if it can not be found there, then the path is searched.  Some windows based apps also use the path to search for program components such as dlls, etc...

Yes, if you put command line utilities in C:\Program Files\Support Tools and also add that path to your PATH, then you will always be able to run them from the command line regardless of your current directory.
Avatar of diek_nf

ASKER

I,
Thanks.

Crazyman,
I said it first. I do like your idea of creating a support tools folder. thanks,

diek
Its funny but somthing else I installed created the Support tools folder. I think it had something to do with MS reskit of Support kit. :>)