If you edit IntelliJ's workspace.xml file to set the dynamic.classpath
property to true, it will work.
<component name="PropertiesComponent">
...
<property name="dynamic.classpath" value="true" />
</component>
I believe IntelliJ used to do this via a popup for you, but since the "Shorten Command Line" feature in 2017.3 has been added to the normal default Run/Debug configurations, it no longer does it this way. And since Cucumber for Java is a plugin, it must not know what to do in that scenario.
Hopefully the issue is fixed to add the dropdown:
Found some of the answer here: IDEA 10.5 Command line is too long