#!/bin/sh

#
# source a script that extracts RUNTIME_ARGS and APP_ARGS
#
. `dirname $0`/.extract_args

progname=java

## [mks] - Check for the DISPLAY variable.  If it is not set, assume
##         the user needs NS_JAVA - which does not need X11.
if [ -z "$DISPLAY" ]
then
    NS_JAVA=true
    export NS_JAVA
fi

progsuffix=
if [ -n "$NS_JAVA" ]
then
    progsuffix=_ns
elif [ -n "$DYN_JAVA" ]
then
    progsuffix=_dyn
fi

#
# Run the compiler
#
`dirname $0`/${progname}${progsuffix} $RUNTIME_ARGS -ms8m $RUNTIME_ARGS sun.tools.javac.Main $APP_ARGS
