ThingWorx Edge Java SDK > Setting Up to Run Sample Applications
Setting Up to Run Sample Applications
All of the examples discussed in the sections that follow are available in the samples directory of your ThingWorx Edge Java SDK distribution. The directory includes a build script for the Gradle build tool, which you can download from
To run these examples:
1. As needed, download and extract the distribution bundles for the Oracle JDK and Gradle.
2. Assuming that you have extracted the Gradle zip file to c:\gradle or ~/gradle/bin, place Gradle in your command execution path or PATH environment variable. If you used a different location on your hard drive for Gradle, use that location instead. This procedure differs for each platform:
For Windows, open a command line window with the cmd command and enter this command:
set PATH = %PATH%;c:\gradle\bin
For Linux, the command is:
export PATH=$PATH:~/gradle/bin
Leave the command line window or shell open.
3. Type gradle -v in this command line window or shell. The output should look similar to this:

Gradle <version_number>
(encironment-specific information)
4. If your IDE already has Gradle integrated into it, import the samples directory into your IDE. The build.gradle file will configure your classpath for you so that the examples are ready to compile and run.