Tips and tricks

The generated CLASSPATH environment variable gets too long for my system!

The CLASSPATH string can get very long, in particular if the application is installed deep inside the file system. To solve this problem use the 'booter-windows' and/or the 'booter-unix' platforms.

This problem is most common on Windows, but applies to Unix systems too.

How to set environment properties like for example ulimit?

Environment properties are outside the scope of appassembler, but a wrapper script might do the trick. This works for ulimit and other properties, because the shell spawned by JSW inherits the properties of the "parent shell". The wrapper script can look something like:


# The following two lines are used by the chkconfig command. Change as is
#  appropriate for your application.  They should remain commented.
# chkconfig: 2345 20 80
# description: ${}

echo 'Running wrapper for ${}'

if [ "$1" = "start" ] || [ "$1" = "console" ]; then
    ulimit -n 65000
    echo "ulimit set to $(ulimit -n)"

echo 'Calling JSW script'
exec ${rpm.path}/bin/${rpm.appname} $1

Remember to enable filtering to have the variables in the script resolved. (The wrapper script is placed in the "bin" directory.)