Inputs and outputs
Machine is installed in your computer, open a terminal or command prompt and
execute:
java -version
h. Click OK to add the path to the native libraries.
i. Click Finish.
or
Option 2: NetBeans
a. From Projects view, right-click your project and go to Properties.
b. In the categories list on the left, go to Libraries and click Add JAR/Folder.
c. In the Add JAR/Folder window, search the folder where you unzipped the XBee Java Library
and open the xbjlib-X.Y.X.jar file.
d. Click Add JAR/Folder again.
e. Go to the extra-libs folder and select the following files:
rxtx-2.2.jar
n
slf4j-api- x.y.z .jar
n
slf4j-nop- x.y.z .jar
n
f. Select Run in the left tree of the Properties dialog.
g. In the VM Options field, add the following option:
-Djava.library.path=<path_where_the_XBee_Java_Library_is_unzipped>\extra-
libs\native\Windows\win32
where:
<path_where_the_XBee_Java_Library_is_unzipped> is the absolute path of the
n
directory where you unzipped the XBee Java Library file (XBJL_X.Y.Z.zip)
Windows\win32 is the directory that matches your operating system and the Java
n
Virtual Machine installed (32 or 64 bits). If you don't know which Java Virtual Machine is
installed in your computer, open a terminal or command prompt and execute:
java -version
h. Click OK.
Step 6: Add the source code to the project
Follow these steps to add the source to the project.
1. Open the following source code, select all, and copy it to the clipboard: MainApp.java.
2. Add the Java source file with Eclipse or NetBeans.
Option 1: Eclipse
a. In the Package Explorer view, select the project and right-click.
b. From the context menu, select New > Class. The New Java Class wizard opens.
c. Type the Name of the class: MainApp.
d. Click Finish.
XBee® Zigbee® Mesh Kit
Example: receive digital data
107
Need help?
Do you have a question about the XBee Zigbee Mesh Kit and is the answer not in the manual?