<commit_before>[role="xpack"]
[[setup-xpack-client]]
== Configuring {xpack} Java Clients

If you want to use a Java {ref}/transport-client.html[transport client] with a
cluster where {xpack} is installed, then you must download and configure the
{xpack} transport client.

WARNING: The `TransportClient` is aimed to be replaced by the Java High Level REST
Client, which executes HTTP requests instead of serialized Java requests. The
`TransportClient` will be deprecated in upcoming versions of {es}. 

. Add the {xpack} transport JAR file to your *CLASSPATH*. You can download the {xpack}
distribution and extract the JAR file manually or you can get it from the
https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/{version}/x-pack-transport-{version}.jar[Elasticsearc Maven repository].
As with any dependency, you will also need its transitive dependencies. Refer to the
https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/{version}/x-pack-transport-{version}.pom[X-Pack POM file
for your version] when downloading for offline usage.

. If you are using Maven, you need to add the {xpack} JAR file as a dependency in
your project's `pom.xml` file:
+
--
[source,xml]
--------------------------------------------------------------
<project ...>
     <repositories>
     <!-- add the elasticsearch repo -->
      <repository>
         <id>elasticsearch-releases</id>
         <url>https://artifacts.elastic.co/maven</url>
         <releases>
          <enabled>true</enabled>
         </releases>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
      </repository>
      ...
   </repositories><commit_msg>[DOCS] Fixed broken link to java transport client<commit_after>[role="xpack"]
[[setup-xpack-client]]
== Configuring {xpack} Java Clients

If you want to use a Java {javaclient}/transport-client.html[transport client] with a
cluster where {xpack} is installed, then you must download and configure the
{xpack} transport client.

WARNING: The `TransportClient` is aimed to be replaced by the Java High Level REST
Client, which executes HTTP requests instead of serialized Java requests. The
`TransportClient` will be deprecated in upcoming versions of {es}.

. Add the {xpack} transport JAR file to your *CLASSPATH*. You can download the {xpack}
distribution and extract the JAR file manually or you can get it from the
https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/{version}/x-pack-transport-{version}.jar[Elasticsearc Maven repository].
As with any dependency, you will also need its transitive dependencies. Refer to the
https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/{version}/x-pack-transport-{version}.pom[X-Pack POM file
for your version] when downloading for offline usage.

. If you are using Maven, you need to add the {xpack} JAR file as a dependency in
your project's `pom.xml` file:
+
--
[source,xml]
--------------------------------------------------------------
<project ...>
     <repositories>
     <!-- add the elasticsearch repo -->
      <repository>
         <id>elasticsearch-releases</id>
         <url>https://artifacts.elastic.co/maven</url>
         <releases>
          <enabled>true</enabled>
         </releases>
         <snapshots>
            <enabled>false</enabled>
         </snapshots>
      </repository>
      ...
   </repositories>
{'fraction_non_alphanumeric': 0.14168618266978922, 'fraction_numerical': 0.0, 'mean_word_length': 3.0342384887839433, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4798456', 'n_tokens_mistral': 956, 'n_tokens_neox': 916, 'n_words': 328}