Skip to main content

Linux: Running the Java Engine in Linux


Explains how to install and use the Windward Java Engine in Linux.  This tutorial specifically uses Ubuntu 12.04, but the steps should work on any Linux system with little extra effort.


After completing this tutorial you will have installed the Windward Java Engine on a Linux system, and have a working knowledge of running Java programs that use the engine.



Install the JDK

The first thing needed is a JDK (Java Development Kit) installation.  This isn't too hard to come by, but depending on your distribution of Linux, this step might be slightly different.

In Ubuntu 12.04, the package is openjdk-6-jdk (or default-jdk) which can be installed with the following command:

$ sudo apt-get install openjdk-6-jdk

The Oracle JDK isn't available in the default repositories on some systems, which is why we use OpenJDK here.  There are guides on the internet that show you how to get the correct PPA repositories set up to get the Oracle JDK, should you need that option.

For other systems, such as Debian, Fedora, or any other flavor of Linux, this command will be different but it should be pretty straightforward if you are familiar with your operating systems package manager.

Download & Setup the Engine

This step is the meat of this tutorial.  The engine is available from the downloads page, so we'll get that

$ wget

We're going to install it to /opt/windward to make things easy.  In the shown command, replace marcusj with your username.

$ sudo mkdir /opt/windward
$ sudo chown marcusj /opt/windward
$ unzip -d /opt/windward
Then we need to place the jar files in the correct location so Java can find them
$ sudo cp /opt/windward/jars/* /usr/share/java

And of course, tell Java where to find them.  We're adding it to the /etc/environment file for future use.  The export command allows us to work with it during this session.

$ sudo cp /etc/environment /etc/environment.bk
$ printf "CLASSPATH=\".:/usr/share/java/*\"\n" | sudo tee -a /etc/environment
$ export CLASSPATH=.:/usr/share/java/*
Finally we'll run the sample code.  Before you can run the sample code, you will have to enter your license key in or the sample will not run!  You can use your favorite text editor to do this.  I like to use vi
$ cd /opt/windward/demo/Samples/Java/CommandLine/src
$ cp ../ .
$ vi
$ javac
$ java RunReport ../samples/InvoiceTemplate.docx Invoice.pdf -xml ../samples/Order.xml.
And that is it!  If you were to just type java RunReport, you would see a list of command-line arguments that the sample app accepts.  You can also open up or in your favorite Java/text editor to extend it yourself and make your own Windward Java Engine application.

What's Next

We set up the Windward Java Engine in a Linux installation here.  Now you can move on to set up a Java servlet with Tomcat 6 and our Servlet sample!

  • Was this article helpful?