Run .app from inside a Java project?

I am a hava .app application and I want to include it in my project and run it from inside the jar. Here is what I still have:

Runtime.getRuntime().exec( new String[] { "open", "SomeApp.app"} );

SomeApp.app is placed in the root of the src folder.

+3
source share
1 answer

you need to execute

open /path/to/some.app  

and

Runtime.getRuntime().exec( new String[] { "open", "/path/to/app/SomeApp.app"} );

Now your application is in the bank, so it will no longer be the application file that you need so that it is on disk in /path/to/app

You need to extract the file .appfrom .jarand then execute here how to do it

+3
source

Source: https://habr.com/ru/post/1780513/


All Articles