This article outlines how to setup Octane SDK Java in Eclipse for Java developers in Windows platform. Mac users should be able to follow similar steps to setup Octane SDK Java in their Mac environment.
The bold and Italicized strings indicate they are UI strings or controls in Eclipse.
1. Octane SDK Java is downloaded and unzipped in a Windows folder.
2. Eclipse is downloaded and installed on Windows.
3. Java 8 is installed on Windows (you may encounter errors if you use other versions of JRE).
1. Launch Eclipse.
2. Go to File -> New ->Project, which opens New Project dialog. Or if you already have other Java projects, go to File -> New -> Java Project and go to step 4.
3. In New Project dialog, expand Java folder, select Java Project, and click Next button.
4. In New Java Project dialog, in Project name field, enter a project name, make sure Use an execution environment JRE is selected and the correct JRE/JDK is displayed (the current Octane SDK Java supports Java 8), and click Finish button.
5. Go to the folder where you unzipped the Octane SDK Java package, open Impinj_SDK_Java_<version> folder, open samples folder, right click on com folder and select Copy.
6. Go back to Eclipse, in Package Explorer, expand the Java project you just created by clicking the triangle icon next to the project name.
7. Right click on src and select Paste. This copies all the Octane SDK examples into the Eclipse project. There will be errors but ignore them for now.
8. In Package Explorer, right click on the project name, go to New -> Folder, which opens New Folder dialog.
9. In Folder name field, enter lib and click Finish button.
10. Go to Impinj_SDK_Java_<version> folder, open lib folder, right click on OctaneSDKJava-<version>-jar-with-dependencies.jar file and select Copy.
11. Go back to Eclipse, in Package Explorer, right click on lib and select Paste.
12. Expand lib by clicking the triangle icon, right click on OctaneSDKJava-<version>-jar-with-dependencies.jar, go to Build Path, and select Add to Build Path. This will remove all the errors.
13. Expand src -> com.example.sdksamples, double click on HelloOctaneSdk.java.
14. Go to Run -> Run Configurations…
15. Double click on Java Application and click on Arguments tab.
16. In VM arguments field, enter -Dhostname=speedwayr-xx-xx-xx as shown below:
Note: VM arguments: -Dhostname=speedwayr-xx-xx-xx (xx-xx-xx is the last 3 octets of the reader’s MAC address)
17. Now it is ready to run the example. Click Run button.
Tag's EPC are displayed in Console window.
18. To stop the example, click inside the Console window where the tag's EPC are being displayed and hit Enter key. Then click the red square icon.
19. Refer to the Octane SDK Java installation instructions (Search for "log4j warning messages" on the "Octane SDK Java" Tab) to get rid of the warning message: