ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: [OT] getting name of launch jar
Date Thu, 05 Dec 2002 22:13:52 GMT
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:zodiac@holoweb.net] 
Sent: Thursday, December 05, 2002 4:11 PM
To: ant-user@jakarta.apache.org
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message