Newer Version Available
Step 3: Download and Build the Project
Prerequisites:
- Java Development Kit 8 or later (see Java Downloads)
- Eclipse IDE for Java Developers (get a recent version from http://www.eclipse.org/downloads/eclipse-packages/). This example walks you through the steps of building the project with the Eclipse IDE but you can you use your preferred IDE to build the Java client.
To download and build the EMP connector project:
-
To download the project files, do one of the following.
- Clone the EMP-Connector project using
git.
1git clone https://github.com/forcedotcom/EMP-Connector - Download the project zip file from GitHub, and then extract the zip to a local folder.
- Clone the EMP-Connector project using
git.
-
In Eclipse, import the Maven project from the folder where you cloned or extracted the
project.
The dependencies that are specified in the Maven’s pom.xml file, such as CometD, are added in the Java project in Eclipse.
- If the Java project wasn’t automatically built, build it.
1$ java -jar target/emp-connector-0.0.1-SNAPSHOT-phat.jar <username> <password> <channel> [optional_replay_id]To specify a login URL for sandbox or My Domain, use this command, which references the DevLoginExample.java class.
1$ java -classpath target/emp-connector-0.0.1-SNAPSHOT-phat.jar com.salesforce.emp.connector.example.DevLoginExample <login_URL> <username> <password> <channel> [optional_replayId]For <login_URL>, use your org’s My Domain login URL, including the https:// prefix. For example, https://MyDomainName.my.salesforce.com.
If you don’t have a deployed My Domain, use https://login.salesforce.com for a production org and https://test.salesforce.com for a sandbox or developer environment.
Open Source Project
EMP Connector is an open-source project, so you can contribute to it with your own enhancements by submitting pull requests to the repository.