I found that in order to set the App Name in the Mac OS X application menu and not show it as the name of your Java project, you must set it VERY early in the application loop using System.setProperty("apple.awt.application.name", "Your App Name");
This is how I have my set in my "main" java method that launches the application:
public static void main(String[] args) {
String opSysName = System.getProperty("os.name").toLowerCase();
if (opSysName.contains("mac")) {
System.setProperty("apple.awt.application.name", "Your App Name");
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.fileDialogForDirectories", "true");
javax.swing.UIManager.getInstalledLookAndFeels();
}
else {
}
java.awt.EventQueue.invokeLater(() -> {
});
}
source
share