I was fooling around with some applications in my mac (going into contents and trying to change some files, values, etc.)

Of course sometimes I get crashes, but I usually just kill the process and all is good.

This time, though, I could see the application icon in the doc (without the white bar beneath it) but force quit did not help at all.

Going to Application Monitoring did not help, because the app was not listed in there (not with is name, anyway) So, I went to the apple icon on the up - left, click Force Quit, and indeed the app was listed (with its icon) but the name was now "JavaApplicationStub".

Quitting from there did not help either.

I fired up the terminal and checked out all the process (ps -ax) but neither the app nor "JavaApplicationStub" was listed (not even names close to it).

I tried to logout (and then turn off the mac) but it was no use, since the app was preventing the system from shutting down (incidentally this prevented me to fire up any other app because it would automatically close (the system was trying to shut down after all). Fortunately after a couple of minutes OS X admitted it could not close and gave me the capability to use the system again)

So I was unable to identificate what process to kill.

As last resort, I did a killall -u myusername and this got me to a grey screen from where I could not do anything. But pressing Cmd + Alt + Esc (the force quit screen) confirmed that the only thing that was running was "JavaApplicationStub".

(this means that either "JavaApplicationStub" was not a process of mine, or that the system was just unable to close that.)

It would still prevent me to shut down, obviously.

Unsure of how I could fire up the usual proframs again from there (Finder, Dock, etc.) I had to hold down the power button for 10 seconds until finally the mac turned off and I could turn it on again.

Question 1

Now, what was the correct way to handle this situation?

Question 2

I did something very simple, I just deleted a file (innocent looking one) in the app.contents folder. Is it really this easy to prevent the system to quit an application? Could this be exploited potentially?


From the terminal

killall -9 process_name

you can get all the signals ( the -9 part ) from

man signal 
  • I'm gonna have to ask you to elaborate that. What does -9 means, how does it help, why you're specifying the user if there is already the process_name, and how to get the process_name (is JavaApplicationStub? Because that did not show up on the Application MOnitoring). thank you very much! :-) – Ant Apr 29 '14 at 21:27
  • I removed it from the command, though you can have multiple processes of the same application running under different users on your system.. I also added in the man page for signal, to explain all the signals – Jonathan Apr 29 '14 at 21:28
  • 1
    the process name can be found using top / ps / htop / pgrep [you can use the pID too] – Jonathan Apr 29 '14 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.