How to output to the console the current CLASSPATH ?

T

Tintin92

Hello,

How to output to the console the current CLASSPATH ?
A small program console is welcome.

Thanks,

Tintin92
 
A

Andrew Thompson

How to output to the console the current CLASSPATH ?

Note that Sun has recommended for quite some
time, that the classpath should be set at
compile or run-time. As such, if you have
one project compiling, and two executing, there
may be three separate and distinct classpath's.
A small program console is welcome.

As is large amounts of cash (in small
denominations of non-consecutive serial
numbers).

Andrew T.
 
R

rao

here we can specify all the files in the runt time by setting class
path with different files between we have to give semicolon
u can see the path ECHO command
 
L

Lew

rao said:
here we can specify all the files in the runt time by setting class
path with different files between we have to give semicolon
u can see the path ECHO command
"u" is a letter.

Classpath elements are directories, not files. Semicolon is the path delimiter
only for Windows.

A path, such as PATH or CLASSPATH, comprises path elements (directories)
separated by the path separator character (OS dependent).

The "ECHO" command is also OS dependent; in UNIX it's "echo".

Perhaps the OP intended for a Java-based solution to obtain the runtime
classpath, not the envar CLASSPATH?

-- Lew
 
T

Thomas Kellerer

Classpath elements are directories, not files.

Not true.

The classpath definition can contain jar files (and zip files) as well,
not only directories.

Thomas
 
L

Lew

Thomas said:
Not true.

The classpath definition can contain jar files (and zip files) as well,
not only directories.

Yes, you are absolutely correct, and don't forget remote URLs. I deliberately
omitted that consideration to stay in context with the OP's question.

-- Lew
 

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,780
Messages
2,569,611
Members
45,279
Latest member
LaRoseDermaBottle

Latest Threads

Top