File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 41188
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.

Ping & DNS - my free Android networking tools app
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.
wood burning stoves
subject: Mac Os X MenuBar Application Name
Similar Threads
Does MAC support Swing?
How to set JTextField with the name in a String
JComponent text in some JApplets don't show on Mac, do show on Windows PC
Mac GUI fails 30 percent of the time, debugging, and swing Vs AWT
JMenuBar problem in MAC