Search code examples
javaswingjarsetup-project

Get the application start up path


How to get path where the set up is being installed of Swing application?

I want to access the application start up path. How is this possible in Java Swing?


Solution

  • If you want to know the directory from which your application was started, then

    String startDir = System.getProperty("user.dir");
    

    will do the trick.