Disable dock icon for java programs in Mac OSX (howto)

If you run a java program in OSX that uses the AWT library, by default the system shows a generic Java dock icon for it, even if the program does not have a GUI (e.g. it’s just using the library for image manipulation). To avoid showing the spurious dock icon, you have to set the java.awt.headless property to “true”. From the command line, this can be done like this:

java -Djava.awt.headless=true ...

This property can also be enabled from the code. For full details, see this article at sun.com.

Advertisements

One response to “Disable dock icon for java programs in Mac OSX (howto)

  1. awesome!!! just what I was looking for.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s