The VoltDB stored procedures are written as Java classes, so you compile them using the Java compiler. Anytime you update your stored procedure code, remember to recompile, package, and reload it into the database using the following steps:java
$ javac -classpath "./:/opt/voltdb/voltdb/*" \ -d ./obj \ *.java $ jar cvf myproc.jar -C obj . $ sqlcmd 1> load classes myproc.jar; 2> show classes;
注意:sql
若是在Windows下面,已經將Java 編譯好了,能夠先cd 進到包的根目錄。spa
好比 要打包的class文件com在:C:\Users\xxx\Desktop 上面code
而後在C:\Users\xxx\Desktop>jar cvf procedure.jar comrem