This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Mac OS and the fly likes Mac Os X MenuBar Application Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Mac Os X MenuBar Application Name" Watch "Mac Os X MenuBar Application Name" New topic

Mac Os X MenuBar Application Name

Kim Mirtens

Joined: Dec 17, 2006
Posts: 21
I was following this tutorial to make my swing application more Mac-like. Putting my swing menu on the mac menubar is no problem. The thing I can't seem to change is my application name. Instead of "" I just want it to display my application name. According to the tutorial I should call:

This sadly doesn't work. When I run my program from the command line and set the property like this

it does work.

I really would like to set this property in the code itself which would allow me to make just one jar file for all platforms and would not require run scripts.

Is there a workaround for this problem?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
What you should really be doing to make the application more Mac-like is to use JarBundler -a free tool from Apple- to give it a native Cocoa wrapper. That'll also give the application a nice icon instead of the generic Java icon, and a proper application name.
Kim Mirtens

Joined: Dec 17, 2006
Posts: 21
Ok, I guess this is the only way. I wanted to save me the trouble of making OS specific versions, but using the jar builder is the only way it works nicely.
Have you checked out Aspose?
subject: Mac Os X MenuBar Application Name
It's not a secret anymore!