Documentation > Development > Setting up H-Store in Eclipse

Automatic Setup

The following instructions assume that you have installed EGit plug-in to enable Eclipse to work with Git repositories and have correctly configured your SSH keys in Github to enable passwordless access.

  1. Create a new workspace for Eclipse (if necessary)
  2. Select File → Import → Git → Projects from Git.
  3. When the next panel comes up, click the Clone… button. In the next window, put in the path to the Github repository into the URI field under Location:
    git@github.com:apavlo/h-store.git

    Click Next.

  4. In the next panel you can select which branches you wish to clone from the remote repository. You most likely only need to clone master. Click Next.
  5. Select the location on your local machine that you wish to store your cloned repository. You can leave the other defaults. Click Finish.
  6. It will now begin to pull down the repository. Once it’s finish, you can then select h-store and click Next.
  7. On the next panel, select the Import Existing Projects option at the top and click Next.
  8. Make sure the H-Store checkbox is checked on the next page and click Finish.

Source Code Formatting

The following steps will configure Eclipse to use the default formatting and clean-up specifications for H-Store.

  1. First download these two files to your local machine:
  2. Open the H-Store project in Eclipse and navigate to Project → Properties → Java Code Style.
  3. Click the Clean Up option in the left-hand menu, and then select the Enable project specific settings checkbox at the top of the panel. Click the Import button and then select the hstore-cleanup.xml file from your local disk.
  4. Next, select the Formatter option under Java Code Style and again select the Enable project specific settings checkbox at the top of the panel. Click the Import button and then select the hstore-formatter.xml file from your local disk.

Third-Party Source Jars

Binary Jar Source Jar URL
commons-collections15-4.01.jar http://sourceforge.net/projects/collections/files/Collections_(Source)/4.01/
junit-4.4.jar http://sourceforge.net/projects/junit/files/junit/4.4/
opencsv-2.3.jar http://sourceforge.net/projects/opencsv/files/opencsv/2.3/
weka-3.6.3.jar http://sourceforge.net/projects/weka/files/weka-3-6/3.6.3/

Manual Setup

NOTE: These instructions are here for posterity reasons. You do not have to configure a new project for H-Store in Eclipse manually.

  1. Select File → New → Java Project. Once the wizard panel comes up, uncheck “Use default location” and set the directory to $HSTORE/src Click next, wait a bit as it reads in all of the source files.
  2. Use default location” and set the directory to $HSTORE/src Click next, wait a bit as it reads in all of the source files.
  3. On the next panel, click “Link Additional Source” and add the following mapping:
    Linked Folder Location Folder Name
    $HSTORE/tests/frontend tests
    $HSTORE/third_party/cpp/protobuf/java/src/main/java protobuf
    $HSTORE/third_party/java/src third_party
  4. Click “Libraries” and click the “Add External Jars” button. Navigate to $HSTORE/third_party/java/jars and select the following jars:
    • ant.jar

    • ant-junit.jar

    • commons-codec-1.5.jar

    • commons-collections15-4.01.jar

    • commons-collections-3.2.1.jar

    • commons-configuration-1.6.jar

    • commons-logging-1.1.1.jar
    • commons-pool-1.5.5.jar

    • japex.jar

    • jung-algorithms-2.0.jar

    • jung-api-2.0.jar

    • jung-graph-impl-2.0.jar

    • jung-visualization-2.0.jar

    • junit-4.4.jar
    • log4j-1.2.15.jar

    • opencsv-2.3.jar

    • tools.jar

    • velocity-1.6.3.jar

    • velocity-1.6.3-dep.jar

    • weka-3.6.3.jar
  5. Click “Finish“. It should now build without any errors.
    If the build still fails, then you may need to change the JRE used by Eclipse. Use the following steps to change this:

    1. Click on Project → Properties → Java Build Path → Libraries.
    2. Click JRE icon at the bottom and then click “Edit“.
    3. Switch the “Alternate JRE” option to “java-6-openjdk“.
  6. Switch to “Navigator” view. Click on white arrow at the top of the left-panel and select “Filters”. Check the boxes for “.*” and “*.class
  7. To improve Eclipse’s content assist feature (i.e., autocomplete), click on Window → Preferences → Java → Editor → Content Assist and under Sorting and Filtering click on the “Type Filters” link. In this panel you can add in the following filters:
    org.apache.commons.collections.*

    com.google.*

    com.sun.*

    com.vladium.*

    java.rmi.*

    net.sf.*

    net.sourceforge.*
    org.apache.velocity.*

    org.doxygn.*

    org.jcp.*

    org.jfree.*

    org.kohsuke.*

    org.omg.*

    org.w3c.*