Setting Up Your Java Developer Environment
This tipsheet describes how to set up your local environment so that you can start using Salesforce APIs, such as SOAP API or REST API.
If you’re setting up a local environment to develop Salesforce applications using Apex and custom Metadata API components, take a look at the Salesforce Extensions for Visual Studio Code.
This tipsheet focuses on tools and configurations you need to set up your local development system. It assumes you already have a working Salesforce organization with the API Enabled permission. API is enabled by default on Developer Edition, Enterprise Edition, Unlimited Edition, and Performance Edition organizations.
To create a Developer Edition org, go to developer.salesforce.com/signup and follow the instructions for signing up for a Developer Edition organization.
If you have a Salesforce organization you can use for development but need to set up a sandbox for development and testing, see Deploy Enhancements from Sandboxes in Salesforce Help.
-
You need the Java Developer Kit (JDK) version 8.0 or later to use Salesforce APIs. Java is a robust, cross-platform, widely used language that integrates well with Salesforce.
-
Eclipse is an integrated development environment (IDE) for Java development.
-
Picking a Path Based on Which API You Use
The next steps for setting up your development environment depend on which Salesforce API you want to use.
-
Install the Web Services Connector (WSDL-Based APIs)
The Lightning Platform Web Services Connector (WSC) is a high-performance runtime framework that makes using WSDL-based Salesforce APIs easier. To install the WSC, download the prebuilt .jar file from the Force MVN repository.
-
Download Developer WSDL Files (WSDL-Based APIs)
Salesforce Web Services Definition Language (WSDL) files provide API details that you use in your developer environment to make API calls.
-
Generating Java Stub Files (WSDL-Based APIs)
To use WSDL-based Salesforce APIs with Java, you need to generate .jar stub files that you can use in your Java projects.
-
Verify the WSDL Environment (WSDL-Based APIs)
You can verify your developer environment with a simple Java test application in Eclipse.
-
Installing HttpClient and JSON Frameworks (REST-Based APIs)
To access REST resources, you’ll need to install HttpClient and JSON frameworks. HttpClient lets you access HTTP resources. The JSON framework lets you generate and parse JSON request and response data.
-
Setting Up External Client App Access (REST-Based APIs)
Because Salesforce REST APIs use OAuth authentication, create an external client app to integrate your application with Salesforce.
-
Verify the REST Environment (REST-Based APIs)
You can verify your developer environment with a simple Java test application in Eclipse.