Please or
Try NowBuy Now

Locations of visitors to this page

SourceForge.net

SourceForge.JP

Paths in Configuration Properties
Paths in Configuration Properties

Configuration Property Overview

Paths in Configuration Properties

Java handles both forward slashes '/', and backslashes '\', correctly on Windows. To make your wrapper.conf cross platform compatible, you should always use forward slashes in all paths in wrapper.conf.

At startup of Wrapper, it always sets its current working directory to the location of the Wrapper executable. When the Wrapper launches Java, its working directory will remain the same, making relative path references function reliably.

On Linux and Unix versions, the shell script (sh) which is shipped with the Wrapper will change set the working directory to the location of the script. This is required so that relative paths will always work correctly even when the script used to launch the Wrapper is referenced using a symbolic reference.

The above functionality on all platforms makes it possible to make all file references in the configuration file use relative paths. Relative paths are preferable in most cases because they make it easy to install an application at any location and then it work correctly without modification. In most cases relative file references will also work on all platforms.

The example configuration file fragments below show that some property values which use static platform specific with absolute paths can be modified to relative paths. Note that there is nothing platform specific in the second example of the properties. This example assumes that the Wrapper binaries and scripts are located in a bin directory under the application's home directory. The application also contains its own JRE to make installation easier for users.

Properties with absolute path (not recommanded):
wrapper.java.command=C:/MyApp/jre/bin/java
wrapper.java.classpath.1=C:/MyApp/lib/wrapper.jar
wrapper.java.library.path.1=C:/MyApp/lib
wrapper.logfile=C:/MyApp/logs/wrapper.log
Properties with relative path (recommanded):
wrapper.java.command=../jre/bin/java
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.library.path.1=../lib
wrapper.logfile=../logs/wrapper.log




User Comments

If you notice something that is incorrect, missing, or simply feel that some part of this page could be explained better, feel free to log in and add a comment. You will need to register before you can log on.

Email:
Password:
Java Service Wrapper Version: 3.5.4