---
schema_version: "1"
id: 11e1f819be2cf55254aa36c58dad1b065e843c8cfb314c85773eae6e1452fb04
title: "Step 2: Build the Client"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/event-bus/pub-sub-api/guides/qs-java-build-client.md
canonical_url: https://developer.salesforce.com/docs/platform/pub-sub-api/guide/qs-java-build-client.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4f4698e646fce309fa7893f4fd0fcad71ba0865672a11f04c1982aea35775a68
products:
  - Pub/Sub API
  - Event Bus Docs
---
# Step 2: Build the Client

Fork and clone the client from GitHub, and then build the client.

**Prerequisites**

- Java 11 (see [Java SE 11 Archive Downloads](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html))
- Apache Maven (see [Installing Apache Maven](https://maven.apache.org/install.html))

1. Fork and then clone the `pub-sub-api` GitHub repository: https://github.com/forcedotcom/pub-sub-api. For more information, see [Fork a repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) in _GitHub Docs_. Forking a repository enables you to save your changes in your forked repository. If you want to skip forking the repo, you can just clone the repo, but you can’t save changes that you make in the `pub-sub-api` repo.
2. In a terminal window, go to the `java` folder in your cloned `pub-sub-api` folder.
3. Build the Java client package and generate required sources from the proto file. From the `java` folder, enter: `mvn clean install`
