Posted By:
Donnie_Hale
Posted On:
Friday, December 28, 2001 08:29 AM
Say I run a program via: java -jar app.jar I need to get the URL of app.jar. If I pass some info as an application parameter, I can do it. However, I'd like to be able to do it without having to rely on an application parameter. I see that it's in the java.class.path system property. And, at least for me, if I run "java -jar -cp other.jar app.jar", "other.jar" does not show up in the java.class.path property. I'm not sure if that's documented or expected behavior or not. If so, then I could just get it from there. Any ideas? Thanks, Donnie
More>>
Say I run a program via:
java -jar app.jar
I need to get the URL of app.jar. If I pass some info as an application parameter, I can do it. However, I'd like to be able to do it without having to rely on an application parameter.
I see that it's in the java.class.path system property. And, at least for me, if I run "java -jar -cp other.jar app.jar", "other.jar" does not show up in the java.class.path property. I'm not sure if that's documented or expected behavior or not. If so, then I could just get it from there.
Any ideas?
Thanks,
Donnie
<<Less