Reputation: 56249
Can I in my Java app find current path where I start that jar file ?
Path of execution ( example: C:\test\test_one> java -jar test.jar
to get C:\test\test_one
) ?
Upvotes: 0
Views: 2640
Reputation: 7882
You can. Within your code you can call System.getProperty("user.dir") to return the working directory of the application.
Upvotes: 5