Documentation > Development > Setting up H-Store in Eclipse
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.
- Create a new workspace for Eclipse (if necessary)
- Select File → Import → Git → Projects from Git.
- 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:
- 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.
- Select the location on your local machine that you wish to store your cloned repository. You can leave the other defaults. Click Finish.
- It will now begin to pull down the repository. Once it’s finish, you can then select h-store and click Next.
- On the next panel, select the Import Existing Projects option at the top and click Next.
- 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.
- First download these two files to your local machine:
- Open the H-Store project in Eclipse and navigate to Project → Properties → Java Code Style.
- 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.
- 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|
NOTE: These instructions are here for posterity reasons. You do not have to configure a new project for H-Store in Eclipse manually.
- 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.
- “Use default location” and set the directory to $HSTORE/src Click next, wait a bit as it reads in all of the source files.
- 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
- Click “Libraries” and click the “Add External Jars” button. Navigate to $HSTORE/third_party/java/jars and select the following jars:
- 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:
- Click on Project → Properties → Java Build Path → Libraries.
- Click JRE icon at the bottom and then click “Edit“.
- Switch the “Alternate JRE” option to “java-6-openjdk“.
- Switch to “Navigator” view. Click on white arrow at the top of the left-panel and select “Filters”. Check the boxes for “.*” and “*.class“
- 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: