Apache commons daemon "Failed creating Java" error

anom217 picture anom217 · Dec 13, 2010 · Viewed 32.6k times · Source

I'm trying to start a Windows service using the Apache commons daemon. It works on Windows XP, but I'm trying to run it on Windows 7 x64. It fails to start and I get the following error in the logs:

[2010-12-13 17:21:19] [info] Commons Daemon procrun (1.0.3.0) started [2010-12-13 17:21:19] [info] Running 'NodeService' Service... [2010-12-13 17:21:19] [info] Starting service... [2010-12-13 17:21:19] [error] Failed creating java [2010-12-13 17:21:19] [error] ServiceStart returned 1 [2010-12-13 17:21:19] [info] Run service finished. [2010-12-13 17:21:19] [info] Commons Daemon procrun finished

I set the JAVA_HOME and added the java bin to PATH, just to be sure. I'm not sure why it's not starting, or if it has to do with the x64 operating system. It was designed for a 32-bit system originally.

Answer

Nath picture Nath · Apr 23, 2013

Just come across the same issue. You can resolve this by changing the JVM path to point to the x64 version as it uses the x32 by default

  • In windows right click the application from the system tray and select configure

  • Click Java tab

  • Set the Java Virtual Machine to/ or use the select path button:

    C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll