I'm writing a Java Swing application for the Mac using Java 1.6. I've read a number of tutorials that step you through how to better integrate your Java application with OS X, but there's one thing I haven't been able to get working. I can't get the application name (the first, bolded menu item in the Mac menu bar) to display. By default, the fully-qualified class name of the main class is shown and I can't get it to change.
This site says that you have to set the following property:
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "AppName");
But that doesn't work (I'm running 10.6, so maybe the property name changed?).
When I create a new Java project in XCode (I normally use Eclipse), the name somehow magically gets set! (it starts you out with a runnable, boiler-plate application) I've looked all around the XCode project for how this is done, but I can't figure it out!
My guess is that it only sets the application name if you wrap your Java application up in a Mac *.app package, but was wondering if anyone knew the answer. Thanks.
EDIT: Interestingly, it sets the application name if I package my application in a runnable JAR file, but not if I run it from Eclipse.