在Mac上,基于JavaFX的应用程序在运行时更改应用程序名称 [英] Change the application name at runtime on Mac for a JavaFX-based App
问题描述
请查看以下图片: http://i.imgur.com/pHIg1AA.png 应用程序启动后,是否可以在运行时在Mac OS X系统菜单栏中更改应用程序名称(基于JavaFX的Mac App")? 如果无法在运行时进行更改,是否可以在应用重启后进行更改? 我认为该名称来自Info.plist. 该应用程序是使用适用于Mac OS X的JavaFX ant任务构建的.
Please take a look at this image: http://i.imgur.com/pHIg1AA.png Is it possible to change the application name ("My JavaFX-based Mac App") in the Mac OS X system menu bar at runtime after the app starts? If it's not possible to change at runtime, is there a way to change it after app restarts? I think that name came from Info.plist. The app is built using JavaFX ant task for Mac OS X.
谢谢.
推荐答案
使用 javafx-maven-plugin ,您可以像这样在pom.xml中指定它:
When using javafx-maven-plugin you can specify it in your pom.xml like this:
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.6.0</version>
<configuration>
<appName>Aaa Working Title</appName>
...
</configuration>
...
</plugin>
这篇关于在Mac上,基于JavaFX的应用程序在运行时更改应用程序名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!