IB Logo

Contributing to the Java Client

Build the Java Client and Samples with Eclipse

The easiest way to build the Java client is with Eclipse. To do this, after forking the repository as described on the previous page (but before cloning it), follow these steps:

If you do not already have Eclipse, download it from here: http://www.eclipse.org/downloads.

EGit is an Eclipse plugin which integrates with GitHub. If EGit is not already installed, download and install it from here: http://www.eclipse.org/egit.

Run Eclipse and open the Git Repositories view (select Window->Show View->Other from the menu).

Click the Clone icon (the tooltip is "Clone a Git repository and add the clone to this view").

A dialog will appear. The first screen is "Source Git Repository". Enter the following fields:

URL: https://github.com/username/tws-api.git [where username is your GitHub username]
Protocol https
Port: [leave empty]
User: [enter your GitHub username]
Password: [enter your GitHub password]

The next screen is "Branch Selection." Check the master branch only.

The final screen is "Local Destination." Check Import all existing projects after clone finishes and take the defaults for all other fields.

Click Finish. The repository will be cloned to your computer and two projects will be created: javaclient, which contains the source code for the Java client, and javatest, which has the source code for the sample application.

In the Git Repositories view, right-click on the tws-api repository and select Switch To->New Branch. Enter a unique name for your branch, take the defaults for the other fields, make sure Checkout new branch is checked, and click Finish. This will create a new branch which is where you will make your code changes.

Synchronize and Commit

After your code changes are complete, right-click on one of the projects in the Project Explorer or Package Explorer view and select Team->Synchronize Workspace.

When you are ready to commit your changes, right-click on the project in the Synchronize view and select Commit.

Enter a comment and click Commit and Push.