How to restart a process without user interaction
If you terminate the java process with kill -9, the shell which called gets an error code back. In your case, the execution of java is the only command in the script run by Automator, so the error code is interpreted by Automator as a general error which triggers the popup.

If you add any other command after the java call (well, any which ends successfully), the Run Shell Script action will complete successfully and Automator will not even notice that the java process was terminated. This command can be something simple like : (which in this form basically does nothing) or sleep 0 (which usually exits successfully).