简体   繁体   English

<ProjectName.ProjectUI sucks as a name for my Netbeans java OS X app

[英]<ProjectName.ProjectUI sucks as a name for my Netbeans java OS X app

What property in Netbeans to I need to change to set the name of my java swing app in the OS X menubar and dock? 我需要更改Netbeans中的哪个属性才能在OS X菜单栏和停靠栏中设置Java swing应用程序的名称? I found info.plist, but changing @PROJECTNAMEASIDENTIFIEER@ in multiple keys here had no effect. 我找到了info.plist,但是在这里的多个键中更改@ PROJECTNAMEASIDENTIFIEER @无效。

Thanks, hating netbeans. 谢谢,讨厌netbeans。

Check: 校验:

nbproject/project.properties

nbproject/project.xml

in project.xml look for the name element... 在project.xml中查找名称元素...

But... Why not just select the main project and right click and do rename? 但是...为什么不选择主项目并右键单击并重新命名呢?

The answer depends on how you run your application. 答案取决于您如何运行应用程序。 If you run it from the command line, use '-Xdock:name=appname' in the JVM arguments. 如果从命令行运行它,请在JVM参数中使用“ -Xdock:name = appname”。 See the section "More tinkering with the menu bar" in the article linked to by Dan Dyer. 请参阅Dan Dyer链接的文章中的“更多地使用菜单栏”。

If you are making a bundled, double-clickable application, however, you just need to set the standard CFBundle-related keys in your application's Info.plist (see the documentation on Info.plist keys for more details). 但是,如果要制作捆绑的,可双击的应用程序,则只需要在应用程序的Info.plist中设置与CFBundle相关的标准密钥(有关更多详细信息,请参阅Info.plist密钥文档 )。

这不是特定于NetBeans的,但是本文提供了一些有关调整Swing应用程序以使其适用于OS X的有用提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM