Issue
I am using latest version of Intellij Idea and set jdk as 11. When I execute my project it throws exception noclassfoundexception : java.sql.SQLException.
In java compiler settings in Intellij I have mentioned project bytecode version as 11. In project structure settings too, I have set the module jdk as 11.
Solution
Try to change command line shortening method to "JAR manifest".
I had exactly the same issue after upgrading my project from Java 8 to Java 11. It looks like it is IntelliJ IDEA bug.
Hint for solution taken from here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000022399-Error-running-a-cucumber-test-case-Caused-by-java-lang-NoClassDefFoundError-java-sql-Time
Answered By - Kostiantyn
Answer Checked By - Willingham (JavaFixing Volunteer)