[21:02] <akashm> hi all
[21:02] <nthykier> hi
[21:02] <akashm> hi nthykier
[21:02] <akashm> i have one question
[21:03] <nthykier> Unless it is a question about how to code in Java, I might have an answer
[21:03] <akashm> :)
[21:04] <akashm> I have created a test.jar file that will execute "pwd" command and will write it to pathFile. I am able to run the test.jar by double clicking on it. location of test.jar is "/home/akashm/Desktop/IDE/test/test.jar".Now I have following problems-
[21:04] <akashm> 1. If I run test.jar from shell i.e.
[21:04] <akashm> $java -jar test.jar
[21:04] <akashm> I get "/home/akashm/Desktop/IDE/test/" as output.
[21:04] <akashm> 2. If I run test.jar by double clicking it then I get
[21:04] <akashm> "/home/akashm" as output.
[21:05] <nthykier> I think this is pretty standard behaviour  actually. Programs that you double  click have their current dir set to your $HOME as I recall
[21:06] <akashm> :'(
[21:06] <nthykier> eqv to doing (something like): cd ~ && java -jar /home/akashm/Desktop/IDE/test/test.jar
[21:06] <akashm> so, what should i do to come out of this scenario?
[21:07] <nthykier> Depends on what you are trying to do
[21:10] <nthykier> If you are trying to find resources or  the path to the "test.jar" then it is possible. However, getting the exact code to accomplish, you may want to use google or #java (on this network) - either of them may know how to do that
[21:10] <nthykier> btw, I believe you have a similar issue on Windows (not that your average Windows user is likely to use the terminal to run the jar file)
[21:12] <akashm> yeah
[21:13] <akashm> even i dont want user to run my jar in terminal
[21:18] <nthykier> shouldn't matter how they run it
[21:18] <nthykier> (unless it is a webapp or something similar)