Quality Testing

Quality is delighting customers

Hi all,

I am getting below error while running a simple Selenium-WebDriver script in Eclipse. can anybody please help me.

When I run a java program I am not getting any error and running perfectly. 

Exception in thread "main" java.lang.UnsupportedClassVersionError: StaticPgms/ChromeTest : Unsupported major.minor version 52.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$100(Unknown Source)
at java.net.URLClassLoader$1.run(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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Views: 288

Reply to This

Replies to This Discussion


java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime.

Testing experts always check below configurations for this type of issue:
a) Go to Eclipse. Open the Project -> Properties -> Java Compiler

b) Enable project specific settings

c) Then select Compiler Compliance Level to 1.6 or 1.5, build and test your app

Hope this solution resolves your issue.

Anand Singh

Your code was compiled with a different Java Version (higher  maybe 1.8) and executed in lower ( say 1.7 ).

Try re -compiling your code in lower Java version .


Use chrome drive best solution.

need to make small changes.

1- Download chrome driver and then 

a) Give the path to chrome driver and use chrome drive rather the firefox driver.


TTWT Magazine





© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service