Quick Start

As with any application, reading through the documentation is the best way to get started. But realizing the desire to get your feet wet quickly, you should glance over this page to get a feel for what the Wrapper can do.

Then to get up and running, at a minimum you will need to read over the Summary of Integration Methods section. There you will be presented with 4 Integration Methods. From the overviews, choose the one that best meets your needs and then proceed to read over the section dedicated to that Integration Method.

[For powerful features of Wrapper] : The Wrapper provides a very large feature set. At some point, it is suggested that you look over the full Configuration Properties to get a feel for the full power of the Java Service Wrapper.

[Need Help?]: If you run into problems or have any questions, the preferred method for getting help is posting a message to the Wrapper-User Mailing List.

Overview of Wrapper features

The Java Service Wrapper is an application which has evolved out of a desire to solve a number of problems common to many Java applications. Below you will find the main features of the Wrapper:

Run a Java application as a Windows Service or UNIX Daemon

The Java Service Wrapper makes it possible to install a Java Application as a Windows Service. Likewise, the scripts shipped with the Wrapper also make it very easy to install a Java Application as a Daemon process on UNIX systems.

The Wrapper correctly handles "user's logouts" under Windows, service dependencies, and the ability to run services which interact with the desktop.

Please visit the documentation pages below for instructions:

Java Application Reliability

As the use of Java expands, your applications have been written to provide a variety of mission and critical services. These services must be able to provide a high level of reliability. In an ideal world, only software which is 100% bug free will ever be released and installed. However, history has shown this not to be the case. Almost every application suffers from quality issues at one point or another during their life-cycle. Applications hang, crash, run out of memory or suffer from any number of problems. Where possible, problems are fixed quickly without significant service outages. There are times however, when fixing a problem can be prohibitively expensive or impossible to solve in a short time period.

The Wrapper monitors a JVM process and automatically restarts it if the JVM has crashed or hung. This process takes just a few seconds once the Wrapper has decided there is a problem. There is also a way to configure the Wrapper to monitor the console output of a JVM and react to certain strings by restarting or shutting down the JVM.

While these advanced features of the Java Service Wrapper will not make every problem go away, they will help you to sleep easier knowing that if there is a problem, the Wrapper will be there to keep things up and running until you can get into the office to check the logs. Say goodbye to those emergency phone calls!

Standard, Out of the Box Scripting

Write once, run everywhere configuration. Java has been marketed as a "Write Once, Run Everywhere" programming language. While this is true for many aspects of an application, the developer is often plagued with having to write complicated, platform-specific scripts, which are tasked with building up class paths and collecting other system information necessary to launch an application.

The Java Service Wrapper helps to relieve the developer of the troublesome task by providing a set of scripts for a wide range of platforms that can be used as is to launch and run almost any Java Application controlled by the Wrapper.

The Wrapper moves all JVM configuration into a platform independent configuration file wrapper.conf. See the examples on Summary of Integration Methods section for details.

On Demand Restarts

The Java Service Wrapper provides a way for a Java Application to request that its own JVM be restarted. This can be useful in a number of cases. Applications may wish to restart after having had their configuration files modified. Or the application may simply need to be restarted to avoid problems with a memory or resource leak of some kind.

JVM restarts can be triggered from within the JVM by making a call to WrapperManager.restart(). See the WrapperManager.restart() in JavaDocs for more details.

There are also more passive ways to trigger restarts. The Wrapper has the ability to monitor console output and trigger shutdowns or restarts whenever certain text is detected.

The Wrapper can also be configured to either restart another JVM instance or shutdown normally depending on the exit code returned by a JVM.

Flexible Configuration

The Java Service Wrapper provides a wide range of configuration properties which can be used to configure the JVM in any way possible from the command line. The Wrapper configuration file "wrapper.conf" also provides a number of properties to allow you to configure things like logging and how the Wrapper is installed as a service.

See the Configuration Properties section for details on what is possible. Be sure you have read over the Summary of Integration Methods section before jumping into the configuration file wrapper.conf.

Ease Application Installations

By using the Wrapper's standard scripts, and relative paths in the configuration file wrapper.conf, it is usually possible to create an application which requires no further complicated installation than simply expanding an archive file into a directory of the user's choice.

Logging

While the Java Service Wrapper does not attempt to, nor should it, replace any of the great Logging Tools available, it does provide a number of properties to configure how "stdout" and "stderr" output to the JVM console is handled. This output can be logged to any combination of the console, a file, or the "Event Log" (Windows) or "syslog" (UNIX).

Logging the output to the JVM console can be critical to tracking down problems with an application. Without the Wrapper, when a JVM is being run as a Service under Windows, or as a Daemon under UNIX, the console output would normally be lost. The Wrapper makes sure that all console output is logged.

Java-based Logging Tools are only capable of logging output generated from within the JVM. If the JVM crashes or prints out low level messages such as thread dumps, there is normally no way to log it. The Wrapper logs all console output from the JVM process, regardless of its source. This means that the records of any crashes will survive even after the Wrapper has restarted the JVM.

See the Logging Configuration section for further details.

Supported JVMs (Java Virtual Machines)

The Wrapper is known to work with Oracle, OpenJDK, IBM, Blackdown and BEA WebLogic JRockit JVMs without any problems. If you get a chance to test any other JVMs, please be sure and let us know the results.

Java Service Wrapper versions 3.4.0 or later require JVM version 1.4.x and above. (Wrapper versions prior to 3.4.0 supported JVM versions back to 1.2.x.)

NOTE

The Wrapper can be used with Java 1.2.x versions. However, some functions are disabled due to this version of Java's lack of support for Shutdown Hooks. Shutdown Hooks were implemented with the 1.3.0 release of Java.

NOTE

Thread deadlock checks require that at least Java version 1.5 is used. Older JVMs will ignore the checks.

The Java Service Wrapper has been tested and is compatible with Java 21.

Supported Platforms

Java Service Wrapper binary distributions are provided for the following list of platforms and are available on the download page.

Only OS versions which are known to work have been listed. If you have had successful or unsuccessful results running on other OS versions, please let us know and it will be added to the list.

It should be fairly easy to build the Wrapper from source on additional UNIX platforms. Please let us know and we will update the list.

By Wrapper Version:

This section will keep track of the platform dependencies for the Wrapper. After each release of a new version, we will add a new page listing the supported platforms for the Wrapper. Please see the pages below with the lists of supported platforms and possible restrictions for reference.