Jetty cannot start "cannot create virtual machine" when I add the -exec option

I get this weirdest error with Jetty. When I try to start it, I get "Unable to start the virtual machine", and the next line says "Unrecognized Option: -".

I run it using a batch file containing just java -jar start.jar and I have an ini file where basically everything is commented out, leaving only the -exec line.

If I also comment on --exec, it launches Jetty, although without Java Java arguments my application is so desperate.

The strangest thing is that exactly the same configuration works on all other systems on which I tried this without any problems.

The problem machine is based on a Windows 2008 R2 server running on the 64-bit JDK 6u29.

I tried almost everything to no avail, searched the Internet for a while for someone who could again encounter a similar problem without a result.

Have any of you seen this or have any suggestions on how to solve this problem.


EDIT: enter bug in bugzilla for the berth for this problem.

+4
source share
1 answer

found a problem ...

quite simply because the path leading to this particular berth installation contained space and a dash as such:

  c: \ toto \ titi \ server - prod \ hereLiesJetty

the -exec option must also be enabled. if the option is disabled, everything works fine, however, you will not be able to configure your vm settings.

which caused a crash on startup through a batch file that used relative paths to search for a virtual machine because it was packaged with the application.

removing a space in the way resolved the problem completely

  c: \ toto \ titi \ server-prod \ hereLiesJetty

Easy enough to reproduce, just get the base package -package and create the batch file that it has in the bin folder, akin to

  cd ..
 java -jar start.jar

and double click on it.

boom ... doomsday!

darn ... so close but so far! these are always the simplest things that reach us, right?

+3
source

Source: https://habr.com/ru/post/1382864/


All Articles