POSIX-ly finding a specific Java process
Instead of simulating a for (( expr1 ; expr2 ; expr3 )) loop, use a POSIX

    for java_process_entry in $java_process_list


Notice that now you don't need to compute the number of lines, neither invoke sed.



There is noting wrong with early return. return 0 as soon as the desired process is found.



There is no need to store the entire list in a variable, neither invoke awk. Process the jps output sequentially.

All that said, consider 

    is_java_program_running()
    {
        jps -l | while read pid java_process_entry; do
            if [ $java_process_entry = "${1}" ]; then return 0; fi
        done
        return 1
    }