Newer Version Available

This content describes an older version of this product. View Latest

Prerequisites for Using the Force.com Migration Tool

Before you can use the Force.com Migration Tool, Java and Ant must be installed and configured correctly. You don’t need to install Java and Ant if you already have them on your computer, so first verify the installation from a command prompt.

Java

Java version 1.7.x or later is recommended for better security and for the latest TLS security protocols.

To check the version of Java that’s installed on your system:

  1. Open a command prompt.
  2. At the prompt, type java -version and press Enter.
The output looks something like the following if you have Java version 7.
1java version "1.7.0_21"
2Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
3Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

For enhanced security, we recommend Java 7 or later and a recent version of the Force.com Migration Tool (version 36.0 or later). Starting with version 36.0, the Force.com Migration Tool uses TLS 1.2 for secure communications with Salesforce if it detects Java version 7 (1.7). The tool explicitly enables TLS 1.1 and 1.2 for Java 7. If you’re using Java 8 (1.8), TLS 1.2 is used. For Java version 6, TLS 1.0 is used. However, Salesforce plans to discontinue TLS 1.0 support on this timeline.

Alternatively, if you’re using Java 7, instead of upgrading your Force.com Migration Tool to version 36.0 or later, you can add the following to your ANT_OPTS environment variable:

1-Dhttps.protocols=TLSv1.1,TLSv1.2

This setting also enforces TLS 1.1 and 1.2 for any other Ant tools on your local system.

Note

To install Java, go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and get the latest version of the Java JDK. When you’re finished with the installation, verify by typing java -version at a command prompt.

Ant

  1. Open a command prompt.
  2. At the prompt, type ant -version and press Enter.

The output should look something like the following:

1Apache Ant version 1.7.0 compiled on December 13 2006

If the Ant version is 1.5.x or earlier, you will need to download the latest version of Ant.

Even if you have Ant installed, you may still need to put the bin directory on your path. On a Windows operation system, you may also need to set the ANT_HOME and JAVA_HOME environment variables as follows.

Note

To install and configure Ant:

  1. Download Apache Ant version 1.6 or later to a directory of your choice: http://ant.apache.org/bindownload.cgi. This directory known as ANT_HOME. When the files are on your computer, no further installation is required.
  2. Add the bin directory to your path. (Only the bin and lib directories are required to run Ant.)
  3. If you are using a Windows operation system, create an ANT_HOME environment variable and set the value to where you have installed Ant. Also create a JAVA_HOME environment variable and set the value to the location of your JDK.

For more information, see http://ant.apache.org/manual/install.html.