Unsupported major.minor version

Problem:

  • How to solve the “Unsupported major.minor version” issue in JMeter?
    OR
  • Unsupported Java Version error while running the JMeter test in distributed (remote) mode

Reason:

To run a test in the distributed mode, it is mandatory to have the same java version installed on all the machines (i.e. master as well as slaves). The below-mentioned error comes when the java version is different on either of the machines.

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/jmeter/NewDriver : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

Error Screenshot:

Unsupported major.minor version in JMeter
Figure 01: Error Screenshot

Solution:

  1. Check the installed version of Java on each machine using the command ‘java -version’
  2. In case of a mismatch in the java version, install the correct version of Java on that machine.
  3. Run the test once again.

Important Note: All the machines used for JMeter Distributed Testing should have the same java version.


You may be interested:


Leave a Comment