close

[Solved] Error: Could not find or load main class cucumber.cli.Main

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing following error in Intellij Error: Could not find or load main class cucumber.cli.Main in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Error: Could not find or load main class cucumber.cli.Main Error Occurs ?

I am facing following error in Intellij.

Error: Could not find or load main class cucumber.cli.Main

How To Solve Error: Could not find or load main class cucumber.cli.Main Error ?

  1. How To Solve Error: Could not find or load main class cucumber.cli.Main Error ?

    To Solve Error: Could not find or load main class cucumber.cli.Main Error Just need to add this dependency to pom.xml cucumber-java Now, Your exception must be solved.

  2. Error: Could not find or load main class cucumber.cli.Main

    To Solve Error: Could not find or load main class cucumber.cli.Main Error Just need to add this dependency to pom.xml cucumber-java Now, Your exception must be solved.

Solution 1: add this dependency to pom.xml 

Just need to add this dependency to pom.xml

<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>5.7.0</version>
</dependency>

Now, Your exception must be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

2 thoughts on “[Solved] Error: Could not find or load main class cucumber.cli.Main”

Leave a Comment