Run Java via Shell Using GWT Classes

When I want to cron a process in the background using my gwt application classes I do something like this:

#!/bin/sh

BASE="/home/design/workspace/GV/war/WEB-INF";

# classes
MYCP="$BASE/classes:"

# jars
MYCP="$MYCP$BASE/lib:"
MYCP="$MYCP$BASE/lib/commons-codec-1.3.jar:"
MYCP="$MYCP$BASE/lib/commons-lang-2.4.jar:"
MYCP="$MYCP$BASE/lib/gwt-servlet.jar:"
MYCP="$MYCP$BASE/lib/log4j-1.2.15.jar:"
MYCP="$MYCP$BASE/lib/mail.jar:"
MYCP="$MYCP$BASE/lib/mysql-connector-java-5.1.5-bin.jar"

# debug output
echo "debug classes: "
echo $MYCP
echo ""

# run the java
#java -cp $MYCP com.gonevertical.test.Run_Test_DB_Conn;
java -cp $MYCP com.gonevertical.test.Run_Test_Email;
exit;
Post a Comment

Popular posts from this blog

How to Get Date/Time in/with GWT

Encoding URL delimiters (for GWT)