read file in my own .jar
phlinux <[email protected]> Thu, 27 Jul 2006 23:58:18 +0200
| Newsgroups | gmane.comp.java.linux.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, java -jar myapplication.jar will launch my java application. I want that this application reads some file from a .jar file. On the internet I found a lot of samples for this job, but of course I need the name of the .jar file. The name of .jar file is myapplication.jar. But how to get it ? In Linux, with C program argv[0] is name of the program. My question is : How can I find that the running program is myapplication.jar ? Is there a portable mechanism in java taht is linke the argv[0] in C context ? Thanks, PHL. ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]