Wow, that was fast! Both methods seem to work, awsome! I might have eventually figured out the first option but I doubt I'd have found the second one :-)

Thanks,

L.

Dominique Devienne wrote:

I believe Java puts the path of that JAR in the java.class.path Java System
Property. Or use Steve's L. trick of doing
someClass.getProtectionDomain().getCodeSource().getLocation().

--DD

-----Original Message-----
From: Laurie Harper [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 4:11 PM
To: [EMAIL PROTECTED]
Subject: [OT] getting name of launch jar

(I know this is off-topic for this list, but I need to find an answer
fast or change approach so I was hoping someone might be able to give me
a pointer!)

I've got an application which is packaged as a single jar, launched by
'java -jar myapp.jar'. The problem is I need to be able to get the path
and file-name of the jar file.

Does anyone know if there is a way to do this?

Thanks,

L.


--
To unsubscribe, e-mail:
For additional commands, e-mail:

--
To unsubscribe, e-mail:
For additional commands, e-mail:

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to