classpath

S

student4life

Could someone show me how to echo classpath on windows DOS prompt? to
find path, one can just type 'path' but this does not work with
'classpath'. Thanks.
 
A

Arne Vajhøj

student4life said:
Could someone show me how to echo classpath on windows DOS prompt? to
find path, one can just type 'path' but this does not work with
'classpath'.

C:\>echo %classpath%

or

C:\>set classpath

Arne
 
A

Arved Sandstrom

Arne said:
C:\>echo %classpath%

or

C:\>set classpath

Arne

I may be teaching my grandmother to suck eggs here, but bear in mind
that when you do this, you'll get the value of the CLASSPATH environment
variable...which if you did not explicitly set it somewhere will be
empty (unset). On any machine I routinely use this will always be empty,
because I never use the variable.

Typically you can expect Java applications to work with their own
classpaths, which often would be set in a startup script using "java"
options. That way they don't rely on a global or per-user CLASSPATH
single value which can be incorrect for any given app.

AHS
 
A

Arne Vajhøj

Arved said:
I may be teaching my grandmother to suck eggs here, but bear in mind
that when you do this, you'll get the value of the CLASSPATH environment
variable...which if you did not explicitly set it somewhere will be
empty (unset). On any machine I routinely use this will always be empty,
because I never use the variable.

Typically you can expect Java applications to work with their own
classpaths, which often would be set in a startup script using "java"
options. That way they don't rely on a global or per-user CLASSPATH
single value which can be incorrect for any given app.

That is definitely good advice.

Arne
 
R

Roedy Green

Could someone show me how to echo classpath on windows DOS prompt? to
find path, one can just type 'path' but this does not work with
'classpath'. Thanks.

with 4NT, you can do
eset CLASSPATH

with MS command prompt you can do

echo %CLASSPATH%

see http://mindprod.com/jgloss/set.html
http://mindprod.com/jgloss/environment.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"People think of security as a noun, something you go buy. In reality, it’s an abstract concept like happiness. Openness is unbelievably helpful to security."
~ James Gosling (born: 1955-05-18 age: 54), inventor of Java.
 
A

Arne Vajhøj

Lew said:
That will echo the CLASSPATH variable. It won't necessarily show the
classpath for a particular Java run.

It was the CLASSPATH variable the original poster
asked how to display.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top