ps2rox@gmail.com schrieb:
> Is possible to get the CLASSPATH using Java commands?
>
[quoted text clipped - 3 lines]
>
> Paulo Silvestre Schmitt.
The system-Property "java.class.path" contains the classpath.
Inside a jar this wont work, because the class-path defined
in the manifest is not set.
Perhaps you can find some info from the current ClassLoader?
Best regards,
feri
Tony Morris - 02 May 2006 22:51 GMT
> ps2rox@gmail.com schrieb:
>> Is possible to get the CLASSPATH using Java commands?
[quoted text clipped - 13 lines]
>
> feri
It will most definitely work - whether or not this meets the objective is
another matter.
Calling System.property("java.class.path") will always return the
java.class.path system property, regardless of any VM invocation properties.

Signature
Tony Morris
http://tmorris.net/
Ferenc Hechler - 04 May 2006 16:22 GMT
Tony Morris schrieb:
> Calling System.property("java.class.path") will always return the
> java.class.path system property, regardless of any VM invocation properties.
this is true, but if you write a manifest
containing "Class-Path: lib/abc.jar config/" and start the jar using
"java -jar my.jar" the java.class.path property is empty, thogh the
lib/abs.jar is loaded and config-files in config/ are found.
Which means the Jar-File Class-Loader does not only
look in the java.class.path
Best regards,
feri
wpghost - 08 May 2006 15:17 GMT
This is exactly what I need.
Thank you guys!