Make the JVM check more cross-JVM friendly.

Signed-off-by: V10lator <v10lator@myway.de>