Windows Startup Wrapper
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
In order to build the startup wrapper 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