Inputs and outputs
Step 4: Create a Java project
Create an empty Java project named using Eclipse or NetBeans, with the following project name:
ReceiveDigitalData.
Option 1: Eclipse
a. Select File > New, and click the Java Project.
b. The New Java Project window appears. Enter the Project name.
c. Click Next.
or
Option 2: NetBeans
a. Select File > New project....
b. The New Project window appears. In the Categories frame, select Java > Java Application
from the panel on the right, and click Next.
c. Enter the Project name and the Project Location. Clear the Create Main Class option; you will
create this later.
d. Click Finish to create the project. The window closes and the project appears in the Projects
view list on the left side of the IDE.
Step 5: Link libraries to the project
This topic describes how to link the XBee Java Library, the RXTX library (including the native one),
and the logger library to the project.
1. Download the
2. Unzip the XBJL_X.Y.Z.zip library.
3. Link the libraries using Eclipse or NetBeans:
Option 1: Eclipse
a. Go to the Libraries tab of the New Java Project window.
b. Click Add External JARs....
c. In the JAR Selection window, search the folder where you unzipped the XBee Java Library and
open the xbee-java-library-X.Y.Z.jar file.
d. Click Add External JARs... 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. Expand the rxtx-2.2.jar file of the Libraries tab list, select Native library location, and click
Edit....
g. Click External folder... to navigate to the extra-libs\native\Windows\win32 folder of the
directory where you unzipped the XBee Java Library file (XBJL_X.Y.Z.zip).
Replace Windows\win32 with the directory that matches your operating system and
n
the Java Virtual Machine installed (32 or 64 bits). If you don't know which Java Virtual
XBee® Zigbee® Mesh Kit
XBJL_X.Y.Z.zip library.
Example: receive digital data
106
Need help?
Do you have a question about the XBee Zigbee Mesh Kit and is the answer not in the manual?