All Products
Search
Document Center

IoT Platform:Environment requirements and configurations

Last Updated:Nov 06, 2023

You can use Link SDK for Java of IoT Platform to connect Java-based devices to IoT Platform. This topic describes the configurations that you must complete for a project before you use Link SDK for Java to connect devices to IoT Platform.

Environment configuration

  1. Specify information about a Maven repository by adding the following configuration to the pom.xml file.

    <repositories>
        <repository>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
  2. Add the following dependencies to the dependencies section in pom.xml file of the project.

    <dependencies>
        <dependency>
            <groupId>com.aliyun.alink.linksdk</groupId>
            <artifactId>lp-iot-linkkit-java</artifactId>
            <version>1.2.3.7</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.2.83</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

Related API operations

For more information about API operations, see API Reference.

Java SDK Demo

IoT Platform provides an SDK demo in Java for your reference.

Important

By downloading the demo, you agree to the software license agreement.