5.3.1. Compiling, Packaging, and Loading Stored Procedures
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:
$ javac -classpath "./:/opt/voltdb/voltdb/*" \
-d ./obj \
*.java
$ jar cvf myproc.jar -C obj .
$ sqlcmd
1> load classes myproc.jar;
2> show classes;
注意:
如果在Windows下面,已经将Java 编译好了,可以先cd 进到包的根目录。
比如 要打包的class文件com在:C:\Users\xxx\Desktop 上面
然后在C:\Users\xxx\Desktop>jar cvf procedure.jar com