0
votes

In order to add JVM args to Jetty's start.ini, you have to also add the option --exec. This is according to the comments in start.ini.

However, when I try to start Jetty with java -jar start.jar

it fails with the following exception:

CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
    at org.eclipse.jetty.start.Main.start(Main.java:693)
    at org.eclipse.jetty.start.Main.main(Main.java:103)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
    at java.lang.ProcessImpl.start(ProcessImpl.java:136)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
    ... 2 more

I am using Jetty 9.1.5 on Windows.

1

1 Answers

1
votes

When browsing for a solution, I've found a bug report which explains the issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425736

It turns out that the bug is occuring whenever the java path contains space characters which often is the case on Windows machines (c:\Programm Files\Java\...).

You can either copy Java to a different location or update Jetty to a version > 9.2 .