Get jar path when running inside .app on mac os x

I have a javafx jar working inside .app. Now, if I do,   System.getProperty("user.dir")  I get the location of the user home ie / Users / DevAccount / where DevAccount is the name of the system user instead of the location of the .app or .jar file. How to find where .app is actually running at runtime?

Alternatively, please suggest installing java.library.path in the folder in the .app package.

Note: . If I run jar outside of .app, I can set java.library.path as desired, but when .app starts, the system.Server property does not return the desired value.

+1
source share
1 answer

javafxpackager java.library.path .app/Contents/Java

, System.getProperty( "java.library.path" ) .

P.S.: @SO , , . - ?

+1

All Articles