# Start script for jfo

if [ "$JAVA_HOME" = "" ] ; then
 echo "ERROR: JAVA_HOME not declared."
 exit 1;
fi

# classpath for jfo
JFO_CLASSPATH=.
JFO_CLASSPATH=$JFO_CLASSPATH:lib/jfo.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/jfo-extension.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/commons-logging-1.1.1.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/fex.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/xercesImpl.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/xalan.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/xml-apis.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/resolver.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/serializer.jar
JFO_CLASSPATH=$JFO_CLASSPATH:lib/gui/kunststoff.jar

# classpath for third party libraries
THIRDPARTY_HOME=./lib/thirdparty
THIRDPARTY_CP=$THIRDPARTY_HOME/fop.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/avalon-framework-api-4.3.1.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/avalon-framework-impl-4.3.1.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/batik-all-1.9.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/commons-io-1.3.1.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/fontbox-2.0.4.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/iText.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/JimiProClasses.zip
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/xml-apis-ext-1.3.04.jar
THIRDPARTY_CP=$THIRDPARTY_CP:$THIRDPARTY_HOME/xmlgraphics-commons-2.2.jar

echo jfo-classpath=$JFO_CLASSPATH
echo thrid-party-classpath=$THIRDPARTY_CP

$JAVA_HOME/bin/java -classpath "$JFO_CLASSPATH:$THIRDPARTY_CP" de.vc.jfo.tools.Commander $*
