Forum: Building VoltDB Applications

Post: VoltDB Eclipse Integration

VoltDB Eclipse Integration
sselvia
Jul 31, 2013
I've reviewed Chapter 5 of the Getting Started with VoltDB, I wanted to use Eclipse to develope/compile/run code for a simple example. In chapter 5 it mentions a script to generate a template application, I'm using the community edition and I'm not finding a reference or instructions to create the template application. Reviewing previous forum posts I have seen that a Generate script had existed, I do not see that in the 3.4 version I downloaded.

Are there more recent instructions that describe how to develope/compile/run a VoltDB application within the Eclipse development envirnoment? The "Hello World" example would be a start.
ajgent
Aug 1, 2013
You are correct. We originally included a generate script in the VoltDB kit to help construct the necessary build.xml file. However, the new command line interface for compiling and running VoltDB simplified the development process and so the build.xml -- and the generate script -- became obsolete and were removed from the kit. Unfortunately, the instructions for using Eclipse did not keep pace.

I cannot promise when the Getting Started chapter will be updated. But I will post a brief explanation of how to start an Eclipse project using the current version of VoltDB shortly.

Thanks for pointing this out.

--Andrew
Eclipse Integration
mostafa
Aug 6, 2013
hello,

can you please help to integrate voltdb with eclipse

regards,
mostafa
dremella
Aug 12, 2013
Hi,

1. Create a user library called VoltDB and add $VOLTDB_HOME/lib/* and $VOLTDB_HOME/voltdb/* as components to add all the necessary jars. Let us call this user library as VoltDBLibraries
2. Create a java project for either DB or client and add VoltDBLibraries to the build path from the properties of the project.
3. You can use ant to compile the sources, to run voltdb compile and if you wish to run VoltDB server inside the constraints of eclipse for testing purposes. Please find the attached build.xml (attached as build.txt - please rename to build.xml) that you can configure according to your settings and use.

The list of targets in it:


compile.src - will compile your source code
catalog - will run voltdb compile command to create the catalog jar file
serverStart - will run voltdb create command with the configured catalog file. This target specifies the license file parameter. If you are using community edition, you would not be needing this param to voltdb create.
serverStop - will run voltadmin shutdown command. Alternatively, you could just stop the ant task from eclipse.
clean - deletes all the class files.


Configurable properties:
ddlLocation - The location in the project to find the DDL file
ddlFileName - Name of the DDL file.
jarFileName - the name of the catalog jar file to be created by voltdb compile.
VoltHome - Base directory of your voltdb installation
VoltLicense - Path of the license file for VoltDB to use during voltdb create
sourceCodePath - where the find the directories containing the java source files. In a typical eclipse java project, the directory is src
compileOutputDir - Directory to place the class files when compile.src is run. This directory is also used in voltdb compile to reference the generated class files
voltClassPath - This is the same as the libraries included in VoltDBLibraries in step1 above.

hello,

can you please help to integrate voltdb with eclipse

regards,
mostafa
mostafa
Aug 15, 2013
thanks dremella,it works fine now :)