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