I have a java application which uses the following line
new File(new File(".").getAbsolutePath())
When running the program from a terminal as:
~/Documents/Routes$ java -jar myApp.jar
The program correctly interprets the java line as folling
/home/user/Documents/Routes
This route is the working directory of the terminal. However if I double click the myApp.jar the result is a bit random
/home/user/Download/.
Which could be the cause that I am getting an incorrect "running" path ?