[Question]Getting name of current "executable" - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Java Programming (https://www.supportforums.net/forumdisplay.php?fid=22) +---- Thread: [Question]Getting name of current "executable" (/showthread.php?tid=4263) |
[Question]Getting name of current "executable" - Qkyrie - 01-09-2010 Hi guys, last month I was busy with some project but took a break from it to study for my exams now. Well, in a month my exams will be finished and I want to finish the project. At this moment, I only got one question regarding the current filename of the jar. Suppose I make a program, and compile it as a jar (for now, later i'll be changing it to an exe).. How you would you guys fetch the name of the jar at runtime? It's easy to get the current path, but how would you get the filename? additional thing to get around: I can't list all the files in the directory and select the one that has the length of the file I need, because the filesize will change at runtime. regards Q ps: posted it here because nobody seems to be able to help on another forum ;-) |