Sourcing UNIX Classpath in Java code

Hi All,

I was wondering where I could find a sample of how I can source the CLASSPATH value in UNIX in a java program.

I want to write a program that can retrieve the value of the CLASSPATH or any other UNIX variable.

If I set something like export $LOG=/mydirectory/log/

How could my program retrieve the $LOG file.

Thanks

[381 byte] By [lachino8] at [2007-9-30 4:01:40]
# 1
With pre-1.3 (i think) and post 1.5 [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String)]System.getenv( String )[/url]
mlk at 2007-6-29 17:34:29 > top of Java-index,Archived Forums,Java Programming...
# 2
For just the classpath, there's a system property, as in:String path = System.getProperty("java.class.path"); I believe. Check the API to confirm.
paulcw at 2007-6-29 17:34:29 > top of Java-index,Archived Forums,Java Programming...