Resolve error "Unsupported major.minor version 51.0" in command prompt/shell in Spectrum

Product Feature: Enterprise Designer

Issue

User find this error in command prompt/shell in Spectrum:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/g1/dcg/job/Main : 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.g1.dcg.job.Main. Program will exit.

Cause

The java version on the client or server is not supported by the Spectrum server/version.

Resolution

UPDATED: October 19, 2017
Verify that the Java environment matches what the Java version should be for the desired Spectrum version sending commands to or wishing to install. 

The CMD will show you which version you should have installed.


 
J2SE 8 = 52,
J2SE 7 = 51,
J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45