14

Hope you can help me. I have a strange org.apache.catalina.startup.Bootstrap icon on my dock in mac. Im using the 10.7.2 version with Lion. I've use this: export JAVA_OPTS="-Djava.awt.headless=true" at the startup.sh and shutdown.sh but got the same problem. Thanks in advance.

Mr. Lance E Sloan
  • 3,297
  • 5
  • 35
  • 50
napstercake
  • 1,815
  • 6
  • 32
  • 57
  • What is your problem and what are you trying to achieve? – Stefan Mar 30 '12 at 22:43
  • Hi Stefan, this "org.apache.catalina.startup.Bootstrap" icon suddenly appears on my doc when I'm running my application, then I have these two problem: My application becomes very slow and after two or three clicks on my web application I got the "java.lang.OutOfMemoryError: PermGen Out of Memory" error. So it's impossible to work with. – napstercake Apr 02 '12 at 19:48
  • The out of memory error and the appearance of Tomcat (AKA Apache Catalina) in your dock are probably unrelated. See my answer below to hide Tomcat from your dock. The out of memory error is probably caused by your application. – Mr. Lance E Sloan May 11 '12 at 15:50

2 Answers2

41

If you don't want Tomcat (AKA Apache Catalina) to appear in the OS X dock or as a running application, stop your Tomcat and edit its conf/catalina.properties file, adding this line:

java.awt.headless=true

The next time you start Tomcat, it will not appear in the dock or as a running application.

Mr. Lance E Sloan
  • 3,297
  • 5
  • 35
  • 50
  • 3
    You can even set `export CATALINA_OPTS="-Djava.awt.headless=true"` in your .bashrc/.bashprofile/.profile – Pier Paolo Ramon Feb 18 '14 at 11:01
  • Yes, @PierPaoloRamon, that may work. Using that method would affect every instance of Tomcat that the user runs. Setting it in `conf/catalina.properties` would only affect that specific installation of Tomcat and not others. It depends on what the user wants to accomplish. – Mr. Lance E Sloan Feb 18 '14 at 14:54
  • Saved me so much headache. Thanks. – Tiago Aug 25 '15 at 11:21
  • I added it to my tomcat startup script `if $darwin; then CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true" fi` (or you could blindly set it w/o the OS check) – Stephen P Jan 26 '18 at 21:43
1

actually, I have to disagree that out of memory and bootstrap appearing in the dock are unrelated, because, I am having exactly the same problem, it only happens when tomcat either crashes, and/or out of memory error appears. BTW I am generating jasperREports when this happens.

As a fact it looks like The out of memory error and the appearance of Tomcat (AKA Apache Catalina) in your dock are related, I am still looking for the solution .

I also strongly suggest not to fix the problem this way:

java.awt.headless=true

this only masks the issue, and makes it more difficult to find the root cause.

Levancho
  • 138
  • 10
  • 2
    Nevertheless, the two points are unrelated. The dock icon appears only in the latest versions of Java; why, I haven't researched, but I run Tomcat routinely without memory issues, and it always produces the dock icon unless I make the above configuration change. – Jerry Andrews Jul 09 '13 at 18:25