ThingWorx Edge Java SDK > Using ThingWorx Platform and the Edge Java SDK > Running the SimpleClient Application
Running the SimpleClient Application
Now that you have seen how the Simple Client application connects, reads and writes properties, invokes services, and fires events, you can run it. If you have installed Gradle as described in the section, Setting Up to Run Sample Applications, you can run the sample application and have it connect to your ThingWorx platform.
The example application expects a remote thing called SimpleThing 1 to be present on your ThingWorx platform. So that you do not need to create it, the entity file, entities/ExampleExport.xml, is provided in your distribution for you to import to your server. In addition, you need to edit the source file. In particular, you need to change the URI for the server to match the URI for your server and replace the AppKey with one that exists on your server.
Follow these steps to edit the source file and run the sample application:
1. From ThingWorx Composer:
a. Create SimpleThing 1 by importing the entity file entities/ExampleExport.xml, into your server.
b. Either obtain an existing or generate a new AppKey to use with the sample application. You will need it while editing the sample source file.
2. From your IDE, open the sample source file, sample/src/com/thingworx/sdk/simple/
3. Locate the following line:
where nn.nn.nnn.nn is the IP address of your server.
4. Edit this line as follows:
a. Change the IP address in this line to the IP address of your server.
b. If you are not using SSL/TLS, change wss: to ws: (at the beginning of the URI).
c. Change the port number in the URI to match the one for accessing your server. For example, if you are running the ThingWorx platform locally without HTTPS, you would use
5. Locate the following line:
where the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx represents the format of an Application Key.
6. Replace the AppKey, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, with the one from your server.
7. Save your changes.
8. Run this example, using this command:
gradle SimpleClient