Oracle GlassFish Server 3.0.1 Application Development Guide

Defining the ANT_OPTS Variable

To define the ANT_OPTS environment variable on UNIX systems, use the following commands, where ${ASINSTALLDIR} is an environment variable defined to point to the GlassFish Server installation directory.

export ANT_OPTS="-Djava.library.path${ASINSTALLDIR}/modules"
export CLASSPATH=${CLASSPATH};${ASINSTALLDIR}/modules/sun-appserv-ant.jar

To define the ANT_OPTS environment variable on Windows systems, use the following commands, where %ASINSTALLDIR% is an environment variable defined to point to the GlassFish Server installation directory.

set ANT_OPTS="-Djava.library.path=%ASINSTALLDIR%\modules"
set CLASSPATH=%CLASSPATH%;%ASINSTALLDIR%\modules\sun-appserv-ant.jar