Java

Getting started with Java is easy. The Kodexa Content Framework core library is available from the maven public repository and is an open source project.

Kodexa Java Github

First, create a standard Maven Project Object Model (POM), and then include a reference to our Maven repository.

<repositories>
    <repository>
        <id>Kodexa</id>
        <url>https://java.kodexa.com/repo/</url>
    </repository>
</repositories>

Once you have that in place, you can add our kodexa-java client as a dependency.

<dependencies>
    <dependency>
        <groupId>com.kodexa.client</groupId>
        <artifactId>kodexa-java</artifactId>
        <version>2.0.10</version>
    </dependency>
    ...
</dependencies>

📘

Java Client Documentation Site

You can find information on the most recent version of our Java client at https://java.kodexa.com/

Configuring Access Token

Setting up your Access Token

Before getting started, make sure you've created an access token for your account, as described in the Creating Access Tokens page.

Using the Access Token

In order to use your access token, you'll need to make it available to your code in one of these two ways:

  • Set the environment variable KODEXA_ACCESS_TOKEN to the generated token value
# Enter the following line in a Terminal window 
# (replace the token string with your value)

export KODEXA_ACCESS_TOKEN='1c619ea51ab6446aba8c2f1ff85fe846'
# Enter the following line in a Command Prompt window 
# (replace the token string with your value)

echo %KODEXA_ACCESS_TOKEN%='1c619ea51ab6446aba8c2f1ff85fe846'
  • You can also set the access token in your code using the KodexaPlatform object. For example:
import com.kodexa.client.cloud.KodexaPlatform;

KodexaPlatform.setAccessToken("1c619ea51ab6446aba8c2f1ff85fe846");

Did this page help you?