Saturday, June 27, 2009

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;

No comments:

Trying out the Dart Analysis Server

I wanted to see how the Dart Analysis Server was put together and worked. I started looking to see how I could wire it up and try out the co...