All Products
Search
Document Center

Simple Log Service:Install the Java SDK

Last Updated:Jun 03, 2026

Install the SLS SDK for Java via Maven (recommended) or by manually importing the JAR package.

Prerequisites

  • Simple Log Service is activated. Activate Simple Log Service.

  • A Java development environment is installed.

    The SLS SDK for Java requires JRE 6.0 or later. Run java -version to check your version. If Java is not installed, download it from the official Java website.

Install the SDK

Install the SLS SDK for Java using one of the following methods:

  • Method 1: Add a dependency to your Maven project (Recommended)

    Add the following dependency to the <dependencies> section of your pom.xml file. This example uses version 0.6.120. Other versions are available in Aliyun Log Java SDK in Maven Repository.

    <dependency>
        <groupId>com.aliyun.openservices</groupId>
        <artifactId>aliyun-log</artifactId>
        <version>0.6.120</version>
    </dependency>

    Always use the latest SDK version. Check the MVNRepository for updates.

  • Method 2: Import the JAR package into your Eclipse project

    To import version 0.6.120:

    1. Download the Java SDK package.

    2. In Eclipse, select your project, and then choose File > Properties.

    3. In the Properties dialog box, click Java Build Path in the left pane.

    4. On the Libraries tab, click Add External JARs.

    5. Select the downloaded JAR file and click Open.

    6. Click Apply and Close.

  • Method 3: Import the JAR package into your IntelliJ IDEA project

    To import version 0.6.120:

    1. Download the Java SDK package.

    2. In IntelliJ IDEA, select your project, and then choose File > Project Structure.

    3. In the Project Structure dialog box, click Modules in the left pane.

    4. On the Dependencies tab, select + > JARs or directories.

    5. In the Attach Files or Directories dialog box, select the downloaded JAR file and click OK.

Next steps

Java SDK quick start