Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
WindowsService
WindowsService

Running OFBiz as a Windows service

  • You need JavaService.exe_._This is freely available at http://javaservice.objectweb.org/.
    Documentation and example code are also available
    Unzip the JavaService-bin-1.2.x.zip (or JavaService-2.0.x.zip)* _
  • Where should the expanded files be located?_
    Set up and run your script with the appropriate path. Ex:
    Code Block
    javaservice -install OFBiz %java_home%\jre\bin\server\jvm.dll -Xms256M -Xmx512M 
    -Djava.class.path=%java_home%\lib\tools.jar;%ofbiz_home%\ofbiz.jar 
    -start org.ofbiz.base.start.Start
    -out %ofbiz_home%\logs\serviceLog.txt 
    -err %ofbiz_home%\logs\serviceErr.txt 
    -current %ofbiz_home% 
    -manual
    
    Note: If your java sdk is installed under a directory with a space in it, the service will install, but not start properly, unless you change java_home to the DOS 8.3 name. For example, if your java sdk is installed in C:\Program Files\Java\j2sdk1.4.2_xx then you would set java_home=C:\PROGRA~1\Java\j2sdk1.4.2_xx* Go to the win2k services app and you should now find a service 'OFBiz' set up to run manually (this of course can be changed to run automatically if so desired).
  • Alternatively, the service can be started with the command:net start OFBiz
  • And the service can then be stopped with the command:net stop OFBiz

Advice from  enki_ at users.sourceforge.net .