cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sandy_2008
Level 7

Getting the system CLASSPATH value

I tried to get the system CLASSPATH value with two different ways in my custom code:

String GetClassPath = System.getProperty("java.class.path",".");


But this is what I get the value:

C:\WINDOWS\TEMP\I1227095198\InstallerData\IAClasses.zip;C:\WINDOWS\TEMP\I1227095198\InstallerData\Execute.zip;C:\WINDOWS\TEMP\I1227095198\Windows\InstallerData\Execute.zip;C:\WINDOWS\TEMP\I1227095198\InstallerData\Resource1.zip;C:\WINDOWS\TEMP\I1227095198\Windows\InstallerData\Resource1.zip;C:\WINDOWS\TEMP\I1227095198\InstallerData;C:\WINDOWS\TEMP\I1227095198\Windows\InstallerData;


This is the other way I get the value,

String GetClassPath = (String) ip.getVariable("lax.nl.env.CLASSPATH");


But this returns null.

Am I doing anything wrong here?Is there any other way to get the value?
Labels (1)
0 Kudos
(1) Reply
purcellk24
Level 7

I'm assuming you are on Windows.
What do you get if you open a command window and run
echo %CLASSPATH%


Why don't you try instead..
String getClasspath = ip.substitute("$lax.nl.env.CLASSPATH$");
0 Kudos