GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltdb.com — 6.7. Compiling and Running Client Applications Using VoltDB6.7. Compiling and Running Client ApplicationsVoltDB client applications written in Java compile and run like other Java applications. (See Chapter 8, Using VoltDB with Other Programming Languages for more on writing client applications using other languages.) To compile, you must include
the VoltDB libraries in the classpath so Java can resolve references to the VoltDB classes and methods. It is possible to do
this manually by defining the environment variable $ javac -classpath "./:/opt/voltdb/voltdb/*" \
-d ./obj \
*.javaThe preceding example assumes that the VoltDB software has been installed in the folder
If you are using Apache Maven to manage your application development, the VoltDB Java client library is available from the central Maven repository. So rather than installing VoltDB locally, you can simply include it as a dependency in your Maven project object model, or pom.xml, like so: <dependency>
<groupId>org.voltdb</groupId>
<artifactId>voltdbclient</artifactId>
<version>5.1</version>
</dependency>6.7.1. Starting the Client ApplicationBefore you start your client application, the VoltDB database must be running. When you start your client application, you must ensure that the VoltDB library JAR file is in the classpath. For example: $ java -classpath "./:/opt/voltdb/voltdb/*" MyClientApp 6.7.2. Running Clients from Outside the ClusterIf 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: The second file, |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |