Description

If you just installed the GenRocket Runtime and receive the following error you need to update your version of Java to the latest. 

C:\Users\stephen>genrocket
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/genRocket
/cli/GenRocketScriptRunner : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: com.genRocket.cli.GenRocketScriptRunner.  Program
 will exit. 


Check your Java Version

To check which version of Java you are running use this web tool from Oracle. This till will inform you if you need to update your version of Java or not. After you update Java, try running the "genrocket" command again. 


Add This System Environment Variable (Java 1.9+)

For versions greater than Java 9+, please add and/or update JAVA_OPTS environment variable to:

--add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED