init script: don't try to run on Java 5

Current init script may try to run Jenkins with Java 5 under some circumstances. This will not work as Jenkins now requires at least Java 6. This PR tries to address this issue by removing all references to Java 5 from init script. It also adds paths for Java 7 and 8.