When my application written in Java
with SWT
runs under OS X
, both from under Eclipse
and from jar
, its name in the launchpad reads "java", like shown in the picture.
In the beginning of my code I call Display.setAppName("MyApp")
, and the name of the application in the menu bar and menu items is correct, it reads MyApp
, About MyApp
, Configure MyApp
, etc. The menu items behave properly, I can receive and handle the appropriate events.
So the problem pertains exclusively to the app name, shown in the launchpad. Is there any way to set the correct name to be shown in the launchpad programmatically, from the code, without creation of the application bundle?
P. S. The code is actually running under JVM that is started from within my code using ProcessBuilder
:
new ProcessBuilder("java -cp mypath MyClass my args").start();
a kind of recursion, needed to compute some jvm options and classpaths programmatically before starting the application.