I don't understand why you'd kill the process after it has started... But that couldThat can be accomplished with the following script considering that grep -m1 doesn't work for you:
#!/bin/bash
  
java -jar xyz.jar &> "/tmp/yourscriptlog.txt" &
processnumber=$!
tail -F "/tmp/yourscriptlog.txt" | awk  '/Started server on port 8000/ { system("kill '$processnumber'") }'
 Basically, this script redirects the stdout of your java code to a file with the command&> "/tmp/yourscriptlog.txt", the last  & on the first line makes your code run as an isolated process and on the next line we have the number of this process with $!. Having the number of the process and a log file to tail we can finally kill the process when the desired line is printed.
 
                