Skip to main content

Running the Java PHP Wrapper Example

engine-wiki-logo.pngThis has been deprecated with the release of the RESTful Engine.


The example will walk you through how to successfully setup the Windward PHP Wrapper Example on a Tomcat application server.


After completing this tutorial you will have a working sample of PHP code that will utilize Java calls to the Windward engine and return generated reports back to the application server to be viewed by the end user.

You can check a running sample on the Windward's web site at


  • Tomcat application server (currently designed for 7.0.47)
  • PHP 5 or higher (currently using PHP 5.3.8)
  • Java 1.6 or higher (currently using Java 1.6. Update 27)
  • PHP Java Bridge (currently php-java-bridge 6.2.1)


Install Windward Java Engine

  • Download the latest version of Windward Java Engine here
  • Install the Windward Java Engine and enter your license key.

Install and Test PHP Java Bridge 

  • Download PHP Java Bridge
  • Rename file JavaBridgeTemplate621.war to JavaBridge.war
  • Copy JavaBridge.war to your Tomcat webapps root directory
    • (Typically here C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps)
  • Tomcat will automatically extract the WAR file and create the application directory "JavaBridge"
  • ​Navigate to http://localhost:PORT/JavaBridge  to verify Java Bridge is installed and working correctly
    • Where localhost is your local machine or DNS name of your server and PORT is the port Tomcat is running on.
  • If you see the test page returning information for the Java calls, then you have successfully setup Java Bridge

Download PHP wrapper

Download PHP wrapper from place it into the Tomcat webapps folder.

The .war file contains everything you need, including PHP/Java Bridge, PHP wrapper classes, all required .jar files, and a sample application.

Be sure to follow the step below to update the license in the existing file embedded in the WAR file.  You can update this before deployment and then save and add the WAR file to the Tomcat webapps folder OR you can add the WAR file to the Tomcat webapps folder and then navigate to WEB-INF/lib/WindwardReports.jar and open this file with a ZIP editor and then update the file with your license key.

The steps (step 4 and step 5) below are optional if you want to update the JAR files to the current version of the Java Engine installed on your system and update your license key.


  • Requird Java Bridge Files: The WAR files is currently built with Java Bridge version 6.2.1
    • Java Bridge requires these files to exist in your application directory /WEB-INF/lib folder
      • JavaBridge.jar
      • php-script.jar
      • php-servlet.jar
  • Update Java Engine JAR Files: The current version of the Windward Java Engine deployed with this WAR file is, you will need to update the JAR files to the latest version of the Windward Engine you have installed in the next steps.
  • Update license embedded in  The file is embedded in the root of the /WEB-INF/lib/WindwardReports.jar file.  It will need to be updated with your current license key in the next steps.

Copy the current Windward Java Engine JAR files to the WindwardSample application directory

  1. Navigate to the "jar" directory where you installed the Windward Java Engine (C:\Program Files\Windward Studios\Windward Java Engine\jar)
  2. Select all files and sub-directories and copy them to "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\WindwardSample\WEB-INF\lib"
  3. When prompted if you want to overwrite the files, select "yes"
  4. You have now updated the Windward JAR files in the WindwardSample application to the latest version

Copy the properties file into the WindwardReports.jar file

  1. Copy file from your Java Engine installation (C:\Program Files\Windward Studios\Windward Java Engine\ to a folder on your system where you can edit file (IE your desktop)
  2. IMPORTANT: Open the file and enter your license near the top after "license=" and save it.
    1. Keep in mind that if you are using a multi-line license you will need to place a "\" at the end of each line, except the last line.
  3. Use a program that can view ZIP (WinZip, WinRAR or 7zip) files to open the WindwardReports.jar file located here:
    1. "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\WindwardSample\WEB-INF\lib\WindwardReports.jar"
  4. Copy the file into the root of the JAR file and save the JAR file.
  5. You license key has now been updated in the file and added to the WindwardReports.jar file so it is always accessible from your application

Restart Tomcat

Restart the server to make sure that the newly added application will be available to the clients.  This can be found under the "Services" section of your Windows Management Console.  You can also execute a restart by stopping and starting the service from the Apache Tomcat icon in your task bar.

Run the sample app

Navigate to WindwardSample/index.html on your server (http://localhost:8080/) to run the sample application.

What's Next

Modify or replace the sample application according to your needs and create your own custom solutions.

  • Was this article helpful?