I think there might be an issue on El Capitan with Java applications force quitting, because I've seen multiple people talk about similar problems to this with no actual solutions presented.

I've been writing applications in eclipse, and one application of mine occasionally has an issue where the program ends, yet the java icon stays in the dock.

I can right-click the icon and tell it to Force Quit, but this has no effect. If I open the force quit window with command-option-escape, the application shows up, but again, force quitting does nothing. The application does not show up in Activity Monitor, so I can't end the process.

Shut-down is impossible while this application remains open. I have to force shutdown and reboot in order to get rid of this program.

I can run "killall Dock" from Terminal, which makes the application disappear from the dock... BUT, the application still shows up in the force quit window, and it still cannot be force quit from there. Furthermore, a terminal-looking window labeled "java" appears after running this command. This new application cannot be force quit through right-click, does NOT show up in the force quit window, and doesn't show up in Activity Monitor either. Shutting down normally is still impossible.

I've seen various other topics where people had this issue with certain java programs under El Capitan, but most had very little detail, and none had a true fix to the issue.

Does anyone know why this happens? How to prevent it from happening in my programs? How to truly force quit applications like these?

  • This is not a java issue. I've experienced this with multiple apps. They stay in the dock even if they're quit, and only a shutdown will fix it. Aug 21, 2016 at 4:44
  • Really? Yikes. So if there's no other way to stop the processes... would it be time to report the bug to Apple? ED: I am curious though- this issue doesn't happen with EVERY app, correct? So there must be something I'm doing wrong in my coding to create this issue. I mean, and a bunch of other app developers, so it's probably not something obvious. But it must be preventable, right? Aug 21, 2016 at 4:51
  • this happens very infrequently to me, and I blame it on the app itself when it does. I have no idea why it does it. Aug 21, 2016 at 12:50

2 Answers 2


You should be able to use Terminal to kill the process, if you know it's name with the following commands.

  1. Find the process identifier (PID). Substitute [your process here] with the name of your process.

    ps -e | grep "[your process here]"

  2. The PID will be on the left most column. Here is example output:

    7642 ttys001 0:00.00 grep

  3. Now type, into terminal, substituting [PID] for your process' PID

    kill -9 [PID]

  4. Re-run step 2. If the process is no longer there, you've successfully killed it.

Brief explanation of steps:

  1. ps gives information of running processes. In this case, we used grep to filter out the specific process we were looking for.

  2. The format of ps's columns is PID/TTY/TIME/CMD. The field we are interested in is PID.

  3. kill -9 sends the undeniable SIGKILL signal to the process specified in PID. This signal cannot be ignored by any process and is hence promptly terminated, no ifs or buts.

  4. As mentioned above, ps gives information of running processes. If your process is no longer in ps's output, it's no longer running.

I would recommend fixing that weird exit bug of yours.

killall Dock only kills the Dock process, which forces an update of programs running. This may make your application disappear from the dock, but the app may still be running in the background.

Personally, I don't have any problems with Java apps in El Capitan. I'm no Java expert so I probably shouldn't suggest any reasons for this unexpected behavior. Have you tried filing a bug report?

  • When running "ps -e | grep Main", the only processes that show up are a bunch of Google Chrome helpers and the grep function itself. When running "ps -e | grep java", only the grep function shows up. I assume the java terminal-looking window is the computer's way of telling me that the app is still running in the background, but it doesn't seem like I have a way to find the name of the process. Aug 21, 2016 at 3:58
  • Have you looked into Activity Monitor for these processes? If not, it might be a zombie process. Alternatively, try greping for the name of your project. Aug 21, 2016 at 4:36
  • Look, I don't like to be rude, but... did you read anything? I mentioned Activity Monitor twice in my original post, and the reply you commented on was ABOUT grep ing the name of my project. I'll look into zombie processes though, maybe that has something to do with it. Aug 21, 2016 at 4:48
  • When I mentioned Activity Monitor, I was referring to obscure-named processes that might not come across as the process you are looking for. If there's a running process, it'll be in Activity Monitor. Just saying, some Java processes I've encountered have really obscure names that I'd never have thought of. In your case though, it's probably a zombie process. Aug 21, 2016 at 5:03
  • All right, I ran ps -e | grep "Z" (since any zombie processes would have Z in the STAT section), but the only process that came up was again, the grep function itself. What sort of names do java programs usually have? I tried the name of my program, "Main", and "java", but none show up in Activity Monitor (despite the program showing up in the force quit window as "Main"). Aug 21, 2016 at 14:39

In Activity monitor, it's probably just called "java", as it's java that's running the application for you. If you run multiple java applications, multiple entries called "java" will be in the list, so be sure to select the right one there. You might be able to infer the correct one by checking what files it opened.

  • There are no entries called "java" in Activity Monitor- which is especially odd, since that's the name of the terminal-looking window that got created. Aug 21, 2016 at 3:59
  • In that case it might be a LaunchServices issue. Can you check the logs in Console.app? Aug 21, 2016 at 17:01
  • I see a bunch of things that say "SecTaskLoadEntitlements failed error=22" that SEEM to match up with the times the error started. Could that have something to do with it? Aug 21, 2016 at 20:19
  • Yes, you might want to try launching the app via Terminal Aug 22, 2016 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .