prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
133 stars 39 forks source link

Only Working on Windows 8.1 #61

Closed rselias closed 6 years ago

rselias commented 6 years ago

I have courgette running perfectly on two computers running Windows 8.1, but when I tried to run a project using courgette on Windows Server 2012 or on three different computers running Windows 10, it fails. Seems like it might be generating a classpath that's too long?

java.io.IOException: Cannot run program "java": CreateProcess error=206, The filename or extension is too long
    at java.lang.ProcessBuilder.start(Unknown Source)
    at courgette.runtime.CourgetteFeatureRunner.run(CourgetteFeatureRunner.java:27)
    at courgette.runtime.CourgetteRunner.runFeature(CourgetteRunner.java:143)
    at courgette.runtime.CourgetteRunner.lambda$run$1(CourgetteRunner.java:47)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 8 more
prashant-ramcharan commented 6 years ago

This is a known issue with Java class paths and Windows operating systems. You can try moving your project libs from .m2 or .gradle directory to C:\libs or similar as this would shorten the path.

Another option is to use Courgette-JVM 2.4.0 with JDK9 or JDK10.

When using Java 9 upwards I no longer build a class path using the URLClassLoader and instead use Java modules.

Using JDK 9 or 10 and Courgette-JVM 2.4.0 should resolve this issue.

prashant-ramcharan commented 6 years ago

Inactive issue - closing.