TestNG | Troubleshoot unsupported major.minor version error
When you run a TestNG or plain Java script, you may get an error related to "Unsupported major.minor version." This error might occur due to a Java version compliance mismatch. To resolve the issue, try setting the JAVA compiler compliance as follows in the Eclipse IDE:
-
Go to Windows options > Preferences > Java > Compiler.
-
From the list, select compiler compliance level 1.7.
-
Click Apply and OK.
-
Try rerunning the application. The issue should now be resolved.