4

I am trying to get the absolute path (as a String) of the directory where the jar file is located. The jar file is executed with an application from another directory.
For this example, let us assume I have a jar file called Test.jar and it is located in C:\TestFolder\. How do I get this full path C:\TestFolder\, not the path of the application executing the jar? I tried using the System.getProperty("user.dir") but this did not work.

Paul Vargas
  • 41,222
  • 15
  • 102
  • 148
jadrijan
  • 1,438
  • 4
  • 31
  • 48

0 Answers0