Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Java Coffee Cup icon from appearing in the Dock on Mac OSX

After upgrading to OSX 10.8.4, background Java processes started placing a Java Cup icon in the Dock. It causes the currently active window to loose focus which is very annoying when running some script that forks many short running Java processes (headless). The file menu (top of the screen next to the apple symbol will show the name of the class file that Java is running, e.g. org.apache.hadoop.util.RunJar).

Since I'm not explicitly launching these Java commands, I've tried putting alias java="java -Djava.awt.headless=true" in .profile but this doesn't seem to help.

Has anyone run into this and know how to fix it?

Thank you.

like image 734
Eugene Avatar asked Jul 04 '13 01:07

Eugene


People also ask

How do I remove an icon from the Dock on a Mac?

Remove an item from the Dock: Drag the item out of the Dock until Remove is shown. Only the alias is removed; the actual item remains on your Mac. If you accidentally remove an app icon from the Dock, it's easy to put it back (the app is still on your Mac). Open the app to make its icon appear again in the Dock.

How to add an icon to Mac Dock?

Method 1: Drag Application Icon to Dock Click “Go,” then select “Applications” from the list. Your Applications folder will open in a Finder window. Locate the app that you want to put in the Dock, then click and drag its icon into the Dock.


1 Answers

Like @EGHM said, it's -Dapple.awt.UIElement=true, but with no quotes. At least it works for me (OS X 10.7.5).

If you happen to be using Eclipse, you can add this JVM argument globally in Preferences → Installed JREs:

enter image description here

like image 96
Nelson Menezes Avatar answered Oct 05 '22 15:10

Nelson Menezes