ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <zod...@holoweb.net>
Subject Re: [OT] getting name of launch jar
Date Thu, 05 Dec 2002 22:48:46 GMT
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: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:
> For additional commands, e-mail:
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:



--
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