Okay, so I\'ve done Swing applications before, and I know if you want to display a different name for the application menu (the one on Macs that usually have a \"Preferences
Using Java 8 on Mac OS X 10.9, setting the System
property
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Name");
appears to be ineffectual in changing the name displayed in the application menu. Alternatives that still work include these:
By default, the application menu will display the simple name of the class specified in the java
command line or the Main-Class
attribute of the JAR's manifest.
java -cp build/classes mypackage.Name
java -jar dist/MyJar.jar
Use the -Xdock:name="Name"
command line parameter.
java -Xdock:name="Name" -cp build/classes mypackage.Main
java -Xdock:name="Name" -jar MyJar.jar
Add the application JAR to a Mac application bundle, as shown here, an add the attribute to the Info.plist
.
<key>JVMOptions</key>
<string>-Xdock:name=Name</string>