Search code examples
seleniumexceptionwebdriverselenium-chromedriverselenium-firefoxdriver

How to solve class version exception


Getting exception while executing written code. Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. I have written below code and that is showing error Java Version- 1.8 enter image description here

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.


Solution

  • Major minor version error happen when you have JRE in Java build path instead of JDK. MajorMinorIssue You have to follow below steps.

    1. Right click on project in the eclipse and go to properties.
    2. Click on Java-Build path.
    3. Go to library section.
    4. If JRE/JDK section is absent in Library section then click on Add Library otherwise select JRE and click edit.
    5. Install JRE -> Add -> Select JDK installed path and Finish.
    6. Select the JDK checkBox in Installed JRE and click ok.
    7. Select JDK in JRE System Library.

    Hope this will solve your problem.