Forum: Building VoltDB Applications

Post: "javac -cp "$CLASSPATH:/opt/voltdb/voltdb/*" LoadAlert.java " Gives an error.

"javac -cp "$CLASSPATH:/opt/voltdb/voltdb/*" LoadAlert.java " Gives an error.
Benny
Jun 16, 2015
Hey :)
I am at the end of the beginner tutorial now and I am stack while trying to compile the LoadAlert.java.
my voltdb path is not in opt/voltdb/voltdb and it's under /usr/share/voltdb/voltdb I switched that but still same error.
also I tried to remove the $CLASSPATH variable which 'echo $CLASSPATH' is empty.
How do I fill it and according to what?

Cheers Benny.
bballard
Jun 16, 2015
Hi Benny,

When compiling stored procedures, unless you are using additional libraries, you only need the /usr/lib/voltdb/voltdb-*.jar file in the classpath.

Here is a script that I use to compile procedures in a src/... directory and then package them in a jar file that can be loaded into VoltDB:

https://github.com/benjaminballard/app-template/blob/master/db/compile_procs.sh

Regards,
Ben