h1ghlevelb1ts

Avoid Dock icon for Java processes on Mac OS

Hi again,

in the previous post I forgot to mention one thing. Ever noticed the useless java bean icon in your Dock when running java processes? Here is how you control their behavior.

If you want to avoid them completely (like for services, eg Tomcat or JBoss) you can just pass the java.awt.property to the JVM. Something like

java -D java.awt.headless=true ...

Just find the right way of doing this in your startup script or in case you are using launchd add it to your plist file.

In the case you actually want to have an icon, but want to have something which actually represents your application you can use the following JVM options:

java -Xdock:name=MyApp -Xdock:icon=/path/to/custom/icon.png ...

Now, I better get ready for JAOO. Currently I am on the ferry between Varberg and Grenå and I have seen a calmer whaether :(

Will also meet Fredrik at JAOO. I am sure there will be more about this conference here shortly.

--Hardy

Old comments

2009-10-05Fredrik Rubensson
Yep - post about the first day is already in the makings.
2009-10-05Hardy Ferentschik
Jupp - and I am running late. Man, I after driving here in Århus I shall never complain about Göteborg again. Ever :)