#!/bin/sh

# ibm.8480
# remove check for rmic.properties file, which is now in classes.zip
#

BINDIR="$0"
BINDIR=`type -path $BINDIR` >/dev/null 2>&1
BINDIR=${BINDIR%/*}

MAIN_CLASS="sun.rmi.rmic.Main"

#
# If RMI-IIOP is installed, use the updated rmi classes
#
if [ -r ${JAVA_HOME}/lib/iioptools.jar ]
then
  CLASSPATH=${JAVA_HOME}/lib/iioptools.jar:${CLASSPATH}
  export CLASSPATH
  MAIN_CLASS="com.ibm.iioptools.$MAIN_CLASS"
fi

#
# source a script that extracts RUNTIME_ARGS and APP_ARGS
#
. $BINDIR/.extract_args

#
# Run the stub compiler
#
$BINDIR/java $RUNTIME_ARGS $MAIN_CLASS $APP_ARGS
