#!/bin/sh
# CrossFTP Startup batch file. For more information, please refer to http://www.crossftp.com

cd "$(dirname "$0")"

#
# Get the Java command
#
if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD=`which java 2> /dev/null `
    if [ -z "$JAVACMD" ] ; then
        JAVACMD=java
    fi
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly."
  echo "  We cannot execute $JAVACMD"
  exit 1
fi

$JAVACMD -Djavax.net.ssl.trustStoreType=JKS -cp crossftp.jar:crossftp-resources.jar:commons-logging.jar:jnlp.jar:looks-2.2.1.jar:bcprov-jdk15on-147.jar:guava-18.0.jar:jclouds-blobstore-LATEST.jar:jclouds-core-LATEST.jar:azureblob-LATEST.jar:openstack-swift-LATEST.jar:openstack-keystone-LATEST.jar:rackspace-cloudidentity-LATEST.jar:javax.annotation-api-1.3.2.jar:jaxb-api-2.3.1.jar:activation-1.1.1.jar crossftp.ui.MainFrameWindow $@
