JAVA_HOME=./jre1.8.0_45
MAINCLASS=myencyclopedia.gui.backup.BackupMain
CP=lib/commons-io-2.4.jar:lib/junit-4.10.jar:lib/log4j-1.2.13.jar:myencyclopedia/me-common-gui-1.8.jar:myencyclopedia/me-common-utils-1.8.jar:myencyclopedia/me-gui-backup-1.5.jar:myencyclopedia/me-gui-help-1.8.jar:myencyclopedia/me-logic-backup-1.5.jar:lib/hamcrest-core-1.1.jar:lib/slf4j-api-1.4.2.jar:lib/slf4j-log4j12-1.4.2.jar:
#CP=A:B
#MAINCLASS=
#JAVA_HOME=

cygwin=false;
macosx=false;
case "`uname -s`" in
    CYGWIN*) 
        cygwin=true 
        ;;
    Darwin*) 
        macosx=true
        ;;
esac

if [ -d "$JAVA_HOME" ]; then
    if $macosx ; then
        JAVA=$JAVA_HOME/Contents/Home/bin/java
    else 
        JAVA=$JAVA_HOME/bin/java
    fi
else
    JAVA=java
fi

if $cygwin ; then
    CP=`cygpath -w -p $CP`
fi

$JAVA -cp $CP $MAINCLASS
