#! /bin/csh 

if ($#argv != 3) then
  echo "xfilesClient <serverhost> <clientpath> <serverpath> "
  exit 1
endif

################ EDIT HERE
# location of the the swing jar file
set JFCJAR = /usr/local/Java/swingall.jar
################ END EDIT

# edit here if not running from the install directory
set XFILES=./xfiles.jar
set JPYTHON=./jpython.jar
# tell jpython to load xfiles.py from .
set PYTHONPATH="-Dpython.path=."
setenv CLASSPATH "${XFILES}:${JPYTHON}:${JFCJAR}"

# increase this for huge file tree
set MEM=-mx32m

# OPTIONAL: only used if doing native link detection:
# path for ld to load nativeFile.so 
setenv LD_LIBRARY_PATH .

# host server will run on (can be same as client)
set XFILES_SERVER = $1

set echo

# commandline for jdk1.1
java ${MEM} ${PYTHONPATH} -DXFILES=rmi://${XFILES_SERVER}:9753/XF XfilesGui $2 $3

# commandline for jdk1.2/2.0
#java ${MEM} ${PYTHONPATH} -cp ${CLASSPASTH} -DXFILES=rmi://${XFILES_SERVER}:9753/XF XfilesGui $2 $3

# this will work if client,server are on the same machine:
# java -mx32m XfilesGui $1 $2
