6.3. Starting VoltDB Client Applications

Documentation

VoltDB Home » Documentation » Using VoltDB

6.3. Starting VoltDB Client Applications

Client applications written in Java compile and run like other Java applications. Once again, when you start your client application, you must make sure that the VoltDB library JAR file is in the classpath. For example:

$ java -classpath "./:/opt/voltdb/voltdb/*"  MyClientApp

When developing your application (using one of the sample applications as a template), the run.sh file manages this dependency for you. However, if you are running the database on a cluster and the client applications on separate machines, you do not need to include all of the VoltDB software with your client application.

The VoltDB distribution comes with two separate libraries: voltdb-n.n.nn.jar and voltdbclient-n.n.nn.jar (wheren.n.nn is the VoltDB version number). The first file is a complete library that is required for building and running a VoltDB database server. The second file, voltdbclient-n.n.nn.jar , is a smaller library containing only those components needed to run a client application.

If you are distributing your client applications, you only need to distribute the client classes and the VoltDB client library. You do not need to install all of the VoltDB software distribution on the client nodes.

>