You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if sbt-jmh included a workaround for running with long classpaths on Windows.
Currently JMH is failing to fork benchmarks and prints:
<failed to invoke the VM, caught IOException: Cannot run program "C:\Program Files\Java\...\java.exe":
CreateProcess error=206, The filename or extension is too long>
This can be worked around by adding this to my sbt configuration:
Jmh/ run / javaOptions ++= (
if (System.getProperty("os.name").startsWith("Windows")) {
Seq("-Djmh.separateClasspathJAR=true", "\"-Djava.io.tmpdir="+ target.value +"\"")
} elseSeq.empty
),
The text was updated successfully, but these errors were encountered:
piotrp
changed the title
Running may fail on Windows
Forking JMH may fail on Windows with "CreateProcess error=206, The filename or extension is too long>"
Oct 28, 2023
piotrp
changed the title
Forking JMH may fail on Windows with "CreateProcess error=206, The filename or extension is too long>"
Forking JMH may fail on Windows with "CreateProcess error=206, The filename or extension is too long"
Oct 28, 2023
It would be great if sbt-jmh included a workaround for running with long classpaths on Windows.
Currently JMH is failing to fork benchmarks and prints:
This can be worked around by adding this to my sbt configuration:
-Djmh.separateClasspathJAR=true
tells JMH to package classpath into JAR file. Setting-Djava.io.tmpdir=
is required if source files aren't on the same drive as temp directory - https://github.com/openjdk/jmh/blob/1.37/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java#L874.The text was updated successfully, but these errors were encountered: