0

Hi all,

Is there any way to get the location of the CLASSPATH environment variable within a pragram.

I need to get the location of rt.jar so that I can dynamically load the classes within that jar file using URLClassLoader.

thanks in advance.

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Danny_501
1

I don't know where the OS keeps its value of the CLASSPATH environment variable.
If you want to get the current value of the CLASSPATH variable, see System Properties:
java.class.path and sun.boot.class.path

0

Thanks for you help, but I do need the value of the OS CLASSPATH.
Does anyone know any other System properties that would return this.

thanks.

1

Also look at the System class. It has method(s) to get the environment variables.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.