Build the Java SE Client Software Libraries

Build the client software libraries from the downloaded source files to customize the functionality of the libraries and change the size of the library JAR files.

  1. Download and install Gradle. Versions 2.2.1 to 2.13 are supported.
  2. Download and unzip iotcs-csl-javase-src-<VERSION>.zip.
  3. Open a command prompt and use the cd command to browse to iotcs/csl/javase.
  4. If your computer is on a Virtual Private Network, or behind a firewall:
    1. Open the gradle.properties file, located in the Gradle user home directory and add these lines:
      systemProp.http.proxyHost=<your_proxy_server.com>
      systemProp.http.proxyPort=<your_proxy_port>
      systemProp.https.proxyHost=<your_proxy_server.com>
      systemProp.https.proxyPort=<your_proxy_port>
      The default value for the Gradle user home directory is USER_HOME/.gradle. To use a different directory, set the GRADLE_USER_HOME environment variable.
    2. Save your changes and close the gradle.properties file.
  5. Run one of these commands to build the Client Software Libraries and documentation:
    Command Description
    gradle Builds the device-library.jar and enterprise-library.jar library files and places them in the build/libs folder.
    gradle deviceClientJar Compiles the code specific to a device client and creates build/libs/device-library.jar
    gradle enterpriseClientJar Compiles the code specific to an enterprise client and creates build/libs/enterprise-library.jar
    gradle —PWITH_VIRTUALIZATION=false Compiles the code specific to a device client without virtualization support. This reduces the size of the device-library.jar
    gradle -PWITH_ENUMERATION=false Compiles the code specific to an enterprise client without resource and message enumeration support. This reduces the size of the enterprise-library.jar file.
    gradle doc Generates the javadoc files and places them in the build/docs folder.