Java processes will not Force Quit on Mac

Model: iMac Mid 2011
OS: OS X El Capitan v. 10.11.6
CPU: 3.4 GHz Intel Core i7
Memory: 16 Gb
Video: AMD Radeon How was your day? 6970M
VASSAL: 3.2.16
Java: 1.8.0_101-b13
Module: Star Wars X-WIng Miniatures Game 6.2.0

When I play X-Wing, multiple processes appear with the Vassal logo and the title “java”. I cannot Force Quit these processes. In fact, I cannot shut down my Mac normally when this happens. I have to hold down the power button to perform a hard shutdown.

When you say you can’t force quit them… do you mean via the dock, via cmd-option-esc, or via Activity Monitor? I have had cases where the first two didn’t work properly, but Activity Monitor should always be able to do it. You should also be able to do it from the Terminal, with sudo killall -KILL java

I’ve tried the first two approaches. I’ve had trouble with Activity Monitor identifying the offending processes. Let me give sudo a try. Thanks.

I should mention that the killall command should kill any and all instances of java VMs active at the time. It’s pretty rare to see on a Mac, but if you are running another java app it will get killed as well. Just something to be aware of, before you reach for the sawn-off shotgun :slight_smile:

I ended up trying this from another website, and it worked:

ps ax | grep “java.*$1” | grep -v grep | awk ‘{ print "kill " $1 }’ | sh

I had to download the Java Development environment. It closed out all the active Java processes (and blanked out the screen for a few seconds, which was kinda scary). I haven’t had any issues since then. Weird. Maybe some Java process was running in the background that wasn’t allowing the others to close.

Thanks for your suggestions.

Outside of a shell function or script where you actually provide a value for $1, that is the most convoluted way I have seen so far to run “killall” :slight_smile:

I would change the two greps to just this though:
grep “[j]ava.*$1”

grep -v grep can exclude other processes by mistake (as a bad example, maybe a commandline includes “logreport”).

I think it was actually designed to be used as a script, and I had no idea what I was doing.

Same problem again. Tried your sudo killall -KILL java and got “No matching processes were found”.

But there are java processes showing in Activity Monitor? I just tried the command here to be sure, and it definitely terminated my vassal instances. No chance of a typo in the command?

When I right-click on the Vassal icons in my dock, one says “Vassal” and the rest say “java”. But I don’t see anything in my Activity Monitor that says “java”.