Installation
Install Database
Commander4j can work with mySQL, MSSQL or Oracle databases. Without going into the specifics of how each database product works the following is a checklist of what needs to be done in order to prepare the database for use with Commander4j.
General recommendations. If we assume that your just wanting to get the application working with the least amount of work then I would recommend installing SQL Server Express for Windows based computers. For MacOS I would recommend mySQL and for Linux you have the choice of mySQL or Oracle. To be accurate most databases will work with most operating systems using Docker these days - but in the interest of simplicity I would use the previous recommendations. Apologies to any Oracle DBA's out there but I would not recommend it unless you have a lot of previous experience.
mySQL
A detailed guide showing how to install mySQL under windows can be found here.
- Create a database/schema user account for Commander4j to use.
- Create a user which has the newly created database as its default schema.
- Ensure that the new user has sufficient permissions to create tables/indexes/views etc.
- Better to grant too much rather than too little initially.
- Ensure that the database is accepting remote connections.
- Ensure that the user is allowed to connect remotely.
MariaDB
Installation is fundamentally as per mySQL - however when you use the Setup4j program within Commander4j you need to make sure you select the following settings.
Collation utf8mb4_general_ci Char Set utf8mb4
Microsoft SQL Server
A detailed guide showing how to install MS SQL Server under windows can be found here.
- Enable the TCP/IP communication protocol as it may be disabled by default.
- Create a database/schema user account for Commander4j to use.
- Create a user which has the newly created database as its default schema.
- Ensure that the new user has sufficient permissions to create tables/indexes/views etc.
- Better to grant too much rather than too little initially.
- Ensure that the database is accepting remote connections.
- Check firewall rules allow connections on port 1433.
- Ensure that the user is allowed to connect remotely.
Oracle
A detailed guide showing how to install Oracle under windows can be found here.
- Create a database/schema user account for Commander4j to use.
- Create a user which has the newly created database as its default schema.
- Ensure that the new user has sufficient permissions to create tables/indexes/views etc.
- Better to grant too much rather than too little initially.
- Ensure that the database is using TCP/IP.
- Ensure that the database is accepting remote connections.
- Check firewall rules allow connections.
Install Java
- Java 21 is needed if you are installing:
- The desktop application on a Linux operating system.
- The web components onto a server using Apache Tomcat.
Note that the web applications should be installed on a nominated server machine and not on workstations.
Recommend installing the Azul Zulu JDK from https://www.azul.com/downloads/#zulu.
Install Tomcat 11.x
- Download from Apache Tomcat Site.
Ensure you download the 32/64Bit Windows Service Installer package.
Install Commander4j
- Obtain the required installation package.
This can be downloaded from Commander4j Website. On a server select the "Full" install option from the setup screen — normally a user's PC will require the "Workstation" install.
Run the appropriate installer for your operating system.
Review and agree the licence agreement.
Select the install destination.
Choose the appropriate install type. Select Full if you are installing the main machine (server) which will run the interfaces, and Workstation for every other machine.
Amend the name of the folder shortcut if needed. Typically you would change the name if you wanted to install more than one copy of the software on the same computer.
Allow the installer to copy files to the destination.
The software is now installed.
Configure Commander4j
- Setup Hosts (Database Connections)
When Commander4j is initially installed you will find a number of dummy database connections already defined. You may find it easier to amend one of these rather than create a new connection. To manage the database connections run Setup4j from the Commander4j program shortcuts.
Configuration
The first step is to install and/or identify the database software that you plan to use with Commander4j. As mentioned previously this can be mySQL, Microsoft SQL Server (including SQL Express) or Oracle (including XE).
Configure Tomcat / Web Application
The web components of Commander4j are contained in the .war files which you download. You won't need all of them and their names may change with updated releases.
The servlet (.war) files shown below are intended to work on Zebra Mobile Computers which have the Zebra Enterprise Browser installed.
| Servlet | Purpose | Environment | Notes |
|---|---|---|---|
| c4j_web_react.war | Pallet Transactions | Any Mobile Browser | * Recommended |
| c4j_web_WS.war | Quality — Product Grading | Any Mobile Browser | Only needed for Quality Control |
| c4j_web_Issue.war | Issue Pallets to Order & Location | Tablet Mobile Browser | Issue/Return of Stock |
Installing the web element of Commander4j is straightforward and requires copying files from the Commander4j install directory into the Tomcat directory:
- Stop the Apache Tomcat service if it is running.
- Copy the file chosen_servlet.war from the Commander4j directory into the WebApps subdirectory of the Tomcat installation directory.
- Start the Apache Tomcat service.
- You should then notice that the chosen_servlet directory has been created under WebApps.
- Update the list of hosts the web application can connect to by copying "Commander4j/xml/hosts/hosts.xml" into "Tomcat/WebApps/chosen_servlet/xml/hosts".
- Confirm this is working by opening the URL http://servername:8080/chosen_servlet/
- If you update the hosts.xml file for a servlet you will need to either restart Apache Tomcat or stop and start the servlet from the Apache Tomcat Manager.
- If you want to connect to a SQL Server database using Windows Integrated Authentication, copy the appropriate version of the auth DLL from the downloaded MS JDBC drivers (e.g. mssql-jdbc_auth-12.10.0.x64.dll) into the Java bin folder.
Create Commander4j Services
See Install Interface Services.
Install Local Middleware
The local middleware service handles the processing of inbound and outbound interface files between Commander4j and external systems such as an ERP. It runs as a background service on the Commander4j server machine and is configured via the Interface Admin screen within the application.
To install the interface service:
- Ensure Commander4j has been installed using the Full install option, which includes the service wrapper components.
- Open Commander4j, navigate to System > Interface Admin and verify that your interface definitions are configured correctly.
- Use the Assign Service function within the application to register the interface process as a Windows service (on Windows) or configure it as a startup process on Linux/macOS.
- Once registered, start the service and monitor the Interface Log to confirm that messages are being processed correctly.
If you are using Middleware4j to transform files before they reach Commander4j, install and configure Middleware4j separately — see the Middleware4j wiki page for details.
Install Print Queues
Commander4j uses two distinct methods for printing, and each requires a different type of print queue to be set up on the workstation or server.
Standard Reports (JasperReports)
Standard reports — such as pallet summaries, despatch notes and audit reports — are printed using JasperReports and sent to a regular operating system print queue, exactly as you would print a document from a word processor. Any printer visible to the operating system can be used. The report type is configured in the Modules screen.
On Windows, ensure the printer is installed and visible in the Windows Printers & Scanners settings. On Linux, CUPS-managed queues are supported.
Barcode Labels (ZPL)
Barcode labels — pallet labels, case labels and sample labels — are printed by sending raw ZPL (Zebra Printer Language) commands directly to a ZPL compatible printer. This bypasses the normal print driver rendering pipeline entirely, so the print queue must be configured as a raw / pass-through queue.
- Windows — install the printer using the Seagull Scientific Generic Label driver, or configure a Generic / Text Only queue. Do not use a standard Zebra Windows driver, as this will re-interpret the ZPL rather than passing it through.
- macOS — configure a raw printer queue using a tool such as QZ Tray or follow the guidance at qz.io. A standard macOS printer queue will not work for ZPL output.
- Linux — configure a CUPS raw queue pointing at the printer's IP address and port 9100.
If a label is accidentally sent to a standard print queue rather than a raw queue, the printer will output pages of ZPL text commands instead of a label. This is harmless but confirms the queue type needs to be changed.
See also: Zebra ZPL Label, Intermec IPL Label, Label Template Syntax.