Java application won't force quit, prevents shutdown
You should be able to use Terminal to kill the process, if you know it's name with the following commands.


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

ps -e | grep "[your process here]"
The PID will be on the left most column. Here is example output:

7642 ttys001    0:00.00 grep 
Now type, into terminal, substituting [PID] for your process' PID

kill -9 [PID]
Re-run step 2. If the process is no longer there, you've successfully killed it.




Brief explanation of steps:


ps gives information of running processes. In this case, we used grep to filter out the specific process we were looking for.
The format of ps's columns is PID/TTY/TIME/CMD. The field we are interested in is PID.
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.
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?