Running Cucumber Tests - Could not find or load main class cucumber.api.cli.Main
I tried executing .feature file in Cucumber project by right clicking on features folder and came across below error.Any support in this will be highly appreciated.
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java -Dorg.jetbrains.run.directory=/Users/test1/IdeaProjects/untitled3/Features "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=52632:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/cucumber-java/lib/cucumber-jvm-formatter.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/cucumber-java/lib/cucumber-jvm-formatter3.jar" cucumber.api.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm3SMFormatter /Users/test1/IdeaProjects/untitled3/Features
Error: Could not find or load main class cucumber.api.cli.Main
Caused by: java.lang.ClassNotFoundException: cucumber.api.cli.Main
Please sign in to leave a comment.
Please check https://stackoverflow.com/a/47235582/2000323. If error remains, provide a sample project that does not work.
This helps.
I have encountered the same issue and couldn't resolve it. Can someone help me?

What cucumber version do you use? Do you see the corresponding jars in the dependencies of the specified module? https://www.jetbrains.com/help/idea/creating-and-managing-modules.html#working-with-module-dependencies.