The Cucumber for Java Book:

Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… " Is this the forum?

On page 2, the book instructions direct us to place 4 jar files within the jars folder. It says to download the latest versions. I have downloaded these from Maven Central:
cucumber-core-6.9.1
cucumber-java-6.9.1
cucumber-jvm-deps-1.0.6
gherkin-16.0.0

The versions of each jar file are not the same, but they are the latest for each file. Do these files need to be the same version?

When I run:
C:\checkout>java -cp “jars/*” io.cucumber.core.cli.Main -p pretty .

I am getting this error:
Exception in thread “main” java.lang.NoClassDefFoundError: io/cucumber/tagexpressions/TagExpressionParser
at io.cucumber.core.options.CucumberPropertiesParser.parse(CucumberPropertiesParser.java:83)
at io.cucumber.core.cli.Main.run(Main.java:61)
at io.cucumber.core.cli.Main.main(Main.java:34)
Caused by: java.lang.ClassNotFoundException: io.cucumber.tagexpressions.TagExpressionParser
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
… 3 more

I’m almost certain this is due to something lacking within the jar files. Any help?

Thanks! John

2 Likes

Yes, John @jdufour, this is the book forum. Author Seb Rose @sebrose is on DevTalk. I’ve tagged him here so that he will see that you have a question about The Cucumber for Java book #book-the-cucumber-for-java-book. Thanks for reading!

1 Like