OS X上的SWT:更改应用程序名称 [英] SWT on OS X: change application name
问题描述
基于SWT的Java应用程序在应用程序菜单中显示SWT
作为应用程序名称.我试过在Info.plist中更改它并使用Display.setAppName("myApp")
,但这无济于事.我还能尝试什么?
My SWT-based Java application shows SWT
as application name in the application menu. I've tried changing it in Info.plist and using Display.setAppName("myApp")
but it does not help. What else can I try?
顺便说一句,我正在使用位于MyApp.app/Contents/MacOS/MyApp
的shell脚本启动应用程序.
BTW, I'm starting the application using a shell script which is located at MyApp.app/Contents/MacOS/MyApp
.
推荐答案
Display.setAppName()
应该可以工作,条件是在任何Display
实例创建之前(被您或隐式地(例如,如果您呼叫Display.getDefault()
).
Display.setAppName()
should work, at the condition that it is called before any Display
instance is created (either by you or implicitly, e.g. if you call Display.getDefault()
).
这篇关于OS X上的SWT:更改应用程序名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!