OS X上的SWT:更改应用程序名称 [英] SWT on OS X: change application name

查看:105
本文介绍了OS X上的SWT:更改应用程序名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆