#!/bin/sh
# @(#)native2ascii.sh	1.1 96/08/26

#
# Determine JAVA_HOME
#

CLASSPATH="$CLASSPATH"
export CLASSPATH

if [ -z "$JAVA_HOME" ] ; then
    JAVA_HOME=`dirname $0`
    JAVA_HOME=`cd $JAVA_HOME/.. ; /bin/pwd`
fi

if [ ! -d "$JAVA_HOME" ] ; then
    echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2 
    exit 1
fi

if [ ! -r "$JAVA_HOME/lib/classes.zip" ] ; then
    if [ ! -d "$JAVA_HOME/classes" ] ; then
       echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2 
       exit 1
    fi
fi

#
# Run the native2ascii
#
prog=java

eval exec $JAVA_HOME/bin/$prog sun.tools.native2ascii.Main $*
