#/bin/csh -f
# Run Script for HADES 0.45, FNH 08.12.97
#
#
#
if ($?JVM) then
  echo Using Java Virtual Machine from $JVM
else
  if (-x /bin/java) then
    set JVM = /bin/java
  else if (-x /opt/java/bin/java) then 
         set JVM = /opt/java/bin/java
       else 
         echo No Java Virtual Machine found!
         echo Please set the JVM environment variable to your java executable!
         exit
       endif
  endif
endif



# try to guess the PATH to the Java virtual machine binary
#if (-x /bin/java) then
#  set JVM = /bin/java
#else
#  if (-x /opt/java/bin) then
#    set path = ($path /opt/java/bin)
#    set JVM = /opt/java/bin/java
#  else
#    echo I cannot find either /bin/java nor /opt/java/bin/java
#    echo Please make sure that a suitable 'java' executable is in your path!
#    set JVM = `which java`
#  endif
#endif

# check whether the required directory $HOME/hades exists
if (! ((-e $HOME/hades) && (-d $HOME/hades))) then
  echo Directory $HOME/hades not found.
  echo Please create such directory for your own designs, 
  echo or modify this startup script.
  exit 1
else
  echo Found directory $HOME/hades, starting...
endif

# now start HADES
setenv CLASSPATH /opt/java/lib/classes.zip:/opt/hades/hades.jar:/opt/hades:{$HOME}:.
$JVM -mx32M hades.gui.Editor 
