---
schema_version: "1"
id: bc67cdf40d483fef71b43dc01a624fbb11e1b848712f4a4c0b0443c3d56ae88c
title: Prerequisites for Using the Ant Migration Tool
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-migration-guide/guides/daas/forcemigrationtool-prereq.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/forcemigrationtool-prereq.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a49bf9392e5def092ebaa794fcb42434aa6600c3e832b80a3becc343e6b7d47d
products:
  - Ant Migration Tool Guide
  - Platform Developer Content
---

# Prerequisites for Using the Ant Migration Tool

**note:** The Ant Migration Tool is retired with Spring ’24. The tool continues to function as-is for future API versions but isn’t updated with new functionality and isn’t supported.  If Salesforce adds a new feature that is incompatible with Ant, the Ant Migration Tool won't be updated to support it. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

Before you can use the Ant Migration Tool, Java and Ant must be installed and configured correctly. If you already have Java and Ant on your computer, you don’t need to install them, so first verify the installation from a command prompt.

## Java

Java version 11 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.

If you have Java version 11, the output looks something like the following.

```nolang
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.8+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.8+10, mixed mode)
```

**note:** Ant Migration Tool version 51.0 and later requires Java version 11 or later.

If working with Ant Migration Tool version 36.0 to 50.0, for enhanced security, we recommend Java 7 or later and a recent version of the Ant Migration Tool (version 36.0 or later). Starting with version 36.0, the Ant Migration Tool uses TLS 1.2 for secure communications with Salesforce when 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, which is no longer supported by Salesforce.

Alternatively, if you’re using Java 7, instead of upgrading your Ant Migration Tool to version 36.0 or later, you can add the following to your `ANT_OPTS` environment variable:

```nolang
-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.

To install Java, go to [http://www.oracle.com/technetwork/java/javase/downloads/index.html](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 looks something like the following:

```nolang
Apache Ant version 1.7.0 compiled on December 13 2006
```

If the Ant version is 1.5.x or earlier, download the latest version of Ant.

**note:** Even if you have Ant installed, you sometimes still need to put the bin directory on your path. On a Windows operating system, you sometimes also need to set the `ANT_HOME` and `JAVA_HOME` environment variables as follows.

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](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](http://ant.apache.org/manual/install.html).

