aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Mac Os X MenuBar Application Name" Watch "Mac Os X MenuBar Application Name" New topic
Author

Mac Os X MenuBar Application Name

Kim Mirtens
Greenhorn

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 "com.website.package.class" 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
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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 - updated with new look and Ping home screen widget
Kim Mirtens
Greenhorn

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mac Os X MenuBar Application Name
 
Similar Threads
JComponent text in some JApplets don't show on Mac, do show on Windows PC
Does MAC support Swing?
JMenuBar problem in MAC
How to set JTextField with the name in a String
Mac GUI fails 30 percent of the time, debugging, and swing Vs AWT