Tomas Andrle
Tomas Andrle

Reputation: 13354

Launch another instance of Java app on Mac

I have a Mac Java app bundle that has problems opening an OpenGL window from a SWT dialog in a single process. It just doesn't work.

To solve this problem I would like to open a SWT dialog in one instance of the Java app and then have it launch another instance of itself with a parameter saying "this time open the OpenGL window". The part I don't know how to do is finding out what "itself" is on a Mac.

How can I do that?

Upvotes: 1

Views: 116

Answers (1)

trashgod
trashgod

Reputation: 205805

You might be able to adapt this Swing based Launcher that uses exec() to run programs in a separate JVM. If you need to include your own dynamic libraries, you might be able to use one of the relative path symbols described in man dyld under the heading Dynamic Library Loading.

Upvotes: 1

Related Questions