Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
I've been updating a Swing app recently and discovered that under OS X Mavericks the dock name setting does not work as expected. Previously it was possible to set this programatically, now it seems that the dock name can only be set via a java startup option.

Here is the issue demonstrated. My class has the following code:
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "TEST");


When I run this, the result comes up as:

mavdn2.png mavdn5.png

Note that the menu name is not set to the expected 'TEST' value but uses the java class name instead.
In addition to this, the dock is set to 'java' instead of 'TEST'.

When I set the -Xdock:name property on the java executable, this changes the menu name as expected, but the dock still retains it's 'java' text.

mavdn4.png mavdn5.png

At the moment there does not seem to be any way of fixing this in Java code.


Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...