12.3. Compiling and Loading the Compound Procedure

Documentation

VoltDB Home » Documentation » Guide to Performance and Customization

12.3. Compiling and Loading the Compound Procedure

Once you write your compound procedure source code, you compile and load it the same way you compile and load other procedures. First, you compile the Java source file into a class file including the VoltDB library in your Java classpath:

$ export CLASSPATH="$CLASSPATH:./:/opt/voltdb/voltdb/*"
$ javac -d ./obj src/devices/*.java

Then you package the class file with other stored procedures into a JAR file:

$ jar -cf devices.jar -C obj 

Finally you load the JAR file into the database using the sqlcmd LOAD CLASSES directive:

$ sqlcmd
1> LOAD CLASSES devices.jar;