Windows Startup Wrapper

From ADempiere ERP Wiki

Jump to: navigation, search

Table of Contents#System Administrator's Guide | Windows Startup Wrapper

Introduction

To simplify starting the ADempiere client on Microsoft Windows operating systems, the ADempiere project provides a startup wrapper that invokes Java with the necessary arguments to launch the ADempiere client. The startup wrapper is a native Windows executable with the name "Adempiere.exe" which is located in the "launch/Release" folder of the ADempiere project.

Building the Windows startup wrapper for ADempiere

The ADempiere.exe startup wrapper is included with the released software. If you need to rebuild it, you need to download and install "launch4j", the project that will compile the startup wrapper. Once installed run launch4j and open the file "Adempiere.xml" located in the "launch" folder of the ADempiere project. This xml file defines all aspects of the "Adempiere.exe" file that will be created by launch4j. For example it defines which icon shall be compiled into "Adempiere.exe", which JVM to use, etc. In order to build the wrapper press the "Build wrapper" button or use the ant task provided by launch4j.

Passing arguments to Adempiere.exe

Using a .ini file it is possible to pass arguments to the startup wrapper. The name of the .ini file must be "<startup-wrapper-name>.l4j.ini", i.e. in the case of "Adempiere.exe" it must be "Adempiere.l4j.ini" and it must be located in the same directory as "Adempiere.exe". The content of the .ini file could look as follows in order to specify the location of the ADempiere properties file:

# Path in this case is relative to the location of "Adempiere.exe", 
#  i.e. "Adempiere.properties" will be located in the same directory 
#  as "Adempiere.exe"
-DPropertyFile=Adempiere.properties
Personal tools