I’m getting this strangest of errors with Jetty. When I try starting it I get “Unable to start virtual Machine” and next line say “Unrecognized Option: -“.
I start it using a batch file containing simply java -jar start.jar and I have a ini file where basically everything is commented out with leaving only the –exec line.
If I comment also the –exec then Jetty starts, though without the java VM arguments my web app so desperately needs.
Strangest thing is that the exact same config run on all other system I tried it on without problems.
The problem machine is based on Windows server 2008 R2 running the 64 bit JDK 6u29.
I tried pretty much everything to no avail, searched to internet for a while for someone who might encountered a similar problem again without result.
Has any of you seen this or would you have suggestions as to how to tackle this issue.
EDIT: Entered a bug in jetty`s bugzilla for this issue.
found the problem…
quite simply it was because the path leading to that particular installation of jetty contained a space and a dash as such :
also the –exec option must be turned on. if the option is off everything runs fine, however you wont be able to customize your vm options.
that caused the this to fail when started through a batch file that used relative paths to locate the VM as it is packaged with the application.
removing the space in the path resolved the issue completely
Quite easy to reproduce, just get the basic jetty -package and create a batch file it it’s bin folder akin to
and double click on it..
boom… end of the world !
darn… so close yet so far away ! it’s always the simplest things that get to us isn’t it !!