mkdir -p $HOME/.almaot

#locate the java to use
javacmd=java
if [ -e $INSTALLDIR/jre/bin/java ] ; then 
   javacmd=$INSTALLDIR/jre/bin/java
fi

echo Starting ALMA-OT using java from `which $javacmd`

$javacmd $PROXYSETTINGS -cp $INSTALLDIR/lib/jACSUtil.jar -Djava.system.class.loader=alma.acs.classloading.AcsSystemClassLoader -Dacs.system.classpath.jardirs=$INSTALLDIR/lib  -Djava.util.logging.config.class=alma.obsprep.util.LoggingSetup -Dalma.obsprep.PrintStackTrace=true -DTelescope=CSVALMA -Dot.submission.host="https://cycle-5.asa.alma.cl/" -Xmx3072m alma.obsprep.ot.gui.toplevel.ObservingTool 2>$HOME/.almaot/ot.log 1>&2
