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