[Advanced-java] jar filename

Marko markos at ananzi.co.za
Sat Dec 3 13:14:33 PST 2005


Hi all, 
Can you somehow get the filename of the jar that your class is in.
eg.
Test.jar 
inside the jar is hello.class
From hello.class i wanna get the jar filename that the class is in.
So if i placed hello.class in test2.jar i can still get the right filename.
JarFile j = new JarFile(???);

I know its an odd question, but any help would be appreciated.

Thanx


More information about the Advanced-java mailing list