Zebra FXSeries Embedded Java SDK UserGuide - Windows - 1
Zebra FXSeries Embedded Java SDK UserGuide - Windows - 1
Windows
Version 1.0.1
ZEBRA TECHNOLOGIES 1
ABOUT THIS GUIDE
Table of Content
ZEBRA TECHNOLOGIES 2
Introduction
1.0 Introduction
The Zebra FX Series Embedded Java SDK User Guide for Windows describes the detailed steps about
how to use the FX Series Embedded Java SDK to develop, debug and package Embedded application
using fixed RFID reader FX9600 and FX7500 on Windows.
• Zebra Java SDK describes how to create, build, and debug an embedded Java application,
and how to create Start and Stop script files for the deployment packages used to install the
application onto the FX RFID Readers on Windows 10 and windows 7 OS.
• Embedded Sample RFID Java Application from scratch, create, build and debug
• JAR File creation using Manifest file
• Sample Hello world Example from scratch, create, build and debug
Note: Uninstall any older Zebra SDK if installed on Windows host machine.
ZEBRA TECHNOLOGIES 3
REVISION HISTORY
ZEBRA TECHNOLOGIES 4
PRE-REQUISITE
ZEBRA TECHNOLOGIES 5
JAVA SDK INSTALL
Right Click on the zip file, select 7-zip and select Extract files.
Figure 2 : 7-Zip
ZEBRA TECHNOLOGIES 6
Select the folder where the zip file needs to be extracted to, for example, the following screenshot
shows the zip file being extracted to C:\ drive user path.
Note : Please make sure the checkbox under “Extract to” is unchecked. Also, in Windows 7, there is
no text box beside the highlighted checkbox below, please proceed further and click OK.
Figure 3 : 7-Zip extraction
ZEBRA TECHNOLOGIES 7
Navigate to Zebra-FXSeries-Embedded-SDK-> eclipse folder to verify that required files are available
as per following screenshot.
Right Click on This PC (Windows 10) or Computer (Windows 7) and click on properties.
ZEBRA TECHNOLOGIES 8
Click on Advanced properties
ZEBRA TECHNOLOGIES 9
Click On New
Enter Variable value as the path of the extracted zip, for example
Note : There should not be any spaces in Variable name and Variable value fields.
Next, click on OK for 3 times and close the system properties window.
ZEBRA TECHNOLOGIES 10
STARTING SDK
Double click on the eclipse.exe file inside eclipse folder as mentioned in Figure 5.
In the Workspace field, select the folder for project settings and project file storage.
Click on Launch button. In the following example, the path has been set to “C:\ Zebra-FXSeries-
Embedded-SDK\samples\java” folder based on current installation path in the host.
ZEBRA TECHNOLOGIES 11
Close the welcome window if it appears.
Note : If there is an exclamation sign against RFIDSample4App just like the following screenshot,
then there is a mismatch in API library. This can be rectified by removing the API3 jar, this has been
explained down in section 7.1.
ZEBRA TECHNOLOGIES 12
SETUP REMOTE CONNECTION FOR REMOTE DEBUGGING
On eclipse tool bar menu, please Select window-> perspective ->open perspective-> other
ZEBRA TECHNOLOGIES 13
Select the remote system explorer button if available
Right click on Local in the remote system view and select new-> Connection.
ZEBRA TECHNOLOGIES 14
In the New Connection or Remote Linux System Connection,
In the Host field, enter the host (the device IP address or network name).
Note: Deselect Verify host name if the device is not accessible during setup.
ZEBRA TECHNOLOGIES 15
Note: Display over parent profile may change. Still provide connection information.
In the New Connection or Files window, select ssh.files in the configuration section and select Next.
ZEBRA TECHNOLOGIES 16
Figure 21 : ssh Files View
In the New Connection or Processes window select processes.shell.linux in the configuration section
and select Next.
ZEBRA TECHNOLOGIES 17
In the New Connection or Shells window select ssh.shells in the configuration section and Select
Finish.
ZEBRA TECHNOLOGIES 18
To connect to the device, Right click on the remote connection (Test) and select Connect.
ZEBRA TECHNOLOGIES 19
In the Enter Password window:
Select OK.
Note: Select Yes or OK for any warning messages regarding authentication and missing folders for
SSH Handling.
ZEBRA TECHNOLOGIES 20
JAVA SAMPLE APPLICATION BUILD AND DEBUG
Note : If default perspective is not java in eclipse, then we can enable by 2 methods
Method 1 :
Method 2 :
ZEBRA TECHNOLOGIES 21
Select java and click Open.
This section describes the steps on how to import RFID Symbol library for embedded java RFID
application.
Note : In case if the zip file was unzipped to “C:\” folder as mentioned in Figure 3 above and if there
is no exclamation mark on RFIDSample4App project, skip this 7.1 section.
In the Package Explorer view, Right click on the Project and select Properties.
ZEBRA TECHNOLOGIES 22
Figure 30 : RFID Sample Properties
ZEBRA TECHNOLOGIES 23
In the Jar selection window, Browse UP/Back the folder to >>Zebra-FXSeries-Embedded-SDK,
then browse down to >>RFID_JAVA_API of the SDK Installation and select Symbol.RFID.API3.jar
Click Open.
ZEBRA TECHNOLOGIES 24
The Symbol.RFID.API3.jar class library appears in the Referenced Libraries section of the project
entry in package explorer view.
Select the project name (RFIDSample4App) and go to Project menu item and select Clean.
ZEBRA TECHNOLOGIES 25
Note: Disable Start a build immediately checkbox.
Click on Clean button in Clean popup which appears after the above window.
Select Project (RFIDSample4App) and go to project menu and select Build Project.
ZEBRA TECHNOLOGIES 26
After build the results are shown in the Problems tab.
Class file built on windows host machine from eclipse will be transferred to the RFID reader.
ZEBRA TECHNOLOGIES 27
In the Package Explorer view, Right click on the project (RFIDSample4App) and select Properties to
open the project properties window.
Select Java Build Path and then select the Source tab, select project (RFIDSample4App/src).
Select the Folder level in the which the remote folder is to be linked. (see below fig)
ZEBRA TECHNOLOGIES 28
Select Create New Folder to open the New Folder window.
ZEBRA TECHNOLOGIES 29
Select Link to folder in the file system checkbox.
Select the Connection (Test) in the Connection drop down menu, which was created in setting up a
remote connection for remote debugging as mentioned in section 6.
Expand My Home entry, select the directory on the device where the executable has to be created
and deployed as the final step of the build.
Select OK.
ZEBRA TECHNOLOGIES 30
If org file is missing or Empty list appeared while connection to reader, follow the below steps.
Switch back to RSE perspective, expand Test and right click on My Home Directory, select New and
click on Folder.
Enter New Folder Name as org and click on the Finish button.
ZEBRA TECHNOLOGIES 31
In the same way create zebra and RFIDSample4App folder i.e Right click on org folder, select New
and Click on Folder and enter New Folder Name as zebra and click Finish button.
Again Right click on the zebra folder, select New and click on the folder and enter New Folder Name
as RFIDSample4App and click Finish button.
After this the folder structure should be appeared as per following screenshot.
In the New Folder popup, make sure folder name should be changed as shown in the below
screenshot and click OK.
Replace the character “?” with “_” (underscore) , otherwise it will throw error as “?” is not a valid
character.
ZEBRA TECHNOLOGIES 32
Make sure that the new folder (RFIDSample4App_Test) appears in the Folder Selection window and
select OK.
ZEBRA TECHNOLOGIES 33
Select No to keep local build folder.
In the Package Explorer view, Right Click on the Project and click on Debug As -> Debug
Configuration.
ZEBRA TECHNOLOGIES 34
In the Debug Configurations window, right click on Remote Java Application and then click on New
Configuration.
ZEBRA TECHNOLOGIES 35
In the Host field, enter the host (the device IP address or network name).
In the Port field, enter the port available on the host system for remote debugging (for example
11001).
Select Apply.
ZEBRA TECHNOLOGIES 36
7.4.1 Remote SSH Terminal Setup
Open the Terminal view to access the device to start debug session and view application output.
In the Host field, enter the host (the device IP address or network name).
Click on OK.
ZEBRA TECHNOLOGIES 37
Terminal will open up as shown below
Command enter “cd org/zebra/RFIDSample4App” on the terminal to change the build path folder
ZEBRA TECHNOLOGIES 38
Start the debugging application in the eclipse environment
ZEBRA TECHNOLOGIES 39
Select the created debug configuration and select Debug to start the remote application debugging.
Click on Switch.
ZEBRA TECHNOLOGIES 40
Note : By default breakpoint is enabled in the zip provided. Hence, please resume so that the RFID
application comes out of the breakpoint.
Note : On Photon eclipse , remote system explorer does not support SSH terminal. Hence, we need
to switch to Java perspective to visualise the output of RFID application on terminal window.
ZEBRA TECHNOLOGIES 41
The application runs and displays the terminal output in the terminal view.
In case if user wants to change the reader IP, please follow the below steps
Step 1: Under Section 6, goto Figure 25, right click Test connection -> Click on Disconnect -> right
click on Test Connection -> Click on Properties -> Click on Host -> In the Host name dropdown enter
the new IP which user wants to change to.
Step 2 : Select Verify Host Name checkbox -> Click on Apply and Close
Step 3 : Follow Section “7.4 Debug Embedded Java Application” again , follow Figure 51 : Debug
Configuration Properties View, change the IP which user wants to change to.
Step 4 : Follow Section “7.4.1 Remote SSH Terminal Setup” again , follow Figure 53 : SSH Terminal
View, change the IP which user wants to change to.
ZEBRA TECHNOLOGIES 42
EMBEDDED JAVA APPLICATION
• Create Project
• Add sources
• Import RFID system library
• Clean and build steps
• Setting up of Java remote debug config
• Set up Remote build path
• Debug embedded java RFID application
• Creation of Jar executable
• Creation of start and stop script for java installation package
Note: If default perspective is not java in eclipse, then we can enable it in 2 methods.
Once done with above mentioned step, please create a new Java project as mentioned below.
ZEBRA TECHNOLOGIES 43
In the New Java Project/Create a Java Project window, enter the Project name “RFIDSample4App”
and select Finish.
ZEBRA TECHNOLOGIES 44
8.2 Adding Source File to Embedded Java Project
In the package explorer view, expand the project, right-click on src, and select New-> Class.
In the New Java Class Window, enter the Package “org.zebra.RFIDSample4App” and Name
“RFIDSample4App”.
Select Finish.
ZEBRA TECHNOLOGIES 45
The source file appears in the window.
Copy the java source code from “RFIDSample4App.java” file which is part of the java sample folder
at “Zebra-FXSeries-Embedded-SDK\samples\java\RFIDSample4App\src\org\zebra\RFIDSample4App”
Overwrite the file with contents of file which was copied above.
ZEBRA TECHNOLOGIES 46
Add the break point and Save the file.
Note : Add the breakpoint by double clicking the respective line number.
This section describes the steps on how to import RFID Symbol library for embedded java RFID
application.
In the Package Explorer view, Right click on the Project and select Properties.
ZEBRA TECHNOLOGIES 47
Select Java Build Path. Click on Libraries Tab. Select Add External Jars
In the Jar selection window, Browse In the folder, RFID_JAVA_API of the SDK Installation and select
Symbol.RFID.API3.jar
Click Open.
ZEBRA TECHNOLOGIES 48
Click on Apply and Close.
The Symbol.RFID.API3.jar class library appears in the Referenced Libraries section of the project
entry in package explorer view.
ZEBRA TECHNOLOGIES 49
Select the project name (RFIDSample4App) and go to Project menu item and select Clean.
Click on Clean button in Clean popup which appears after the above window.
ZEBRA TECHNOLOGIES 50
Select Project (RFIDSample4App) and go to project menu and select Build Project.
Class file built on windows host machine from eclipse will be transferred to the RFID reader.
ZEBRA TECHNOLOGIES 51
In the Package Explorer view, Right click on the project (RFIDSample4App) and select Properties to
open the project properties window.
Select Java Build Path and then select the Source tab, select project (RFIDSample4App/src).
ZEBRA TECHNOLOGIES 52
Select the Folder level in the which the remote folder is to be linked. (see below fig)
ZEBRA TECHNOLOGIES 53
Select Advanced to expand the window to the advanced version.
ZEBRA TECHNOLOGIES 54
Select the Connection (Test) in the Connection drop down menu, which was created in setting up a
remote connection for remote debugging as mentioned in section 6.
Expand My Home entry, select the directory on the device where the executable has to be created
and deployed as the final step of the build.
If Org folder is missing , please refer to page 29 under Setup Java Remote Build Path.
ZEBRA TECHNOLOGIES 55
Select OK.
Note : In case of if Enter Password window pops up, enter the User ID as “rfidadm”,
In the New Folder popup, make sure folder name should be changed as shown in the below
screenshot and click OK.
ZEBRA TECHNOLOGIES 57
Select No to keep local build folder.
ZEBRA TECHNOLOGIES 58
8.6 Debug Embedded Java Application
This section explains detailed steps on debugging RFID sample application.
In the Package Explorer view, Right Click on the Project and click on Debug As -> Debug
Configuration.
ZEBRA TECHNOLOGIES 59
In the Debug Configurations window, right click on Remote Java Application and then click on New
Configuration.
In the Host field, enter the host (the device IP address or network name).
ZEBRA TECHNOLOGIES 60
In the Port field, enter the port available on the host system for remote debugging (for example
11001).
Select Apply.
ZEBRA TECHNOLOGIES 61
8.6.1 Remote SSH Terminal Setup
Open the Terminal view to access the device to start debug session and view application output.
In the Host field, enter the host (the device IP address or network name).
Click on OK.
Command enter “cd org/zebra/RFIDSample4App” on the terminal to change the build path folder
ZEBRA TECHNOLOGIES 63
Click on the debug icon in the eclipse photon window.
Select the created debug configuration and select Debug to start the remote application debugging.
ZEBRA TECHNOLOGIES 64
Figure 102 : Create Manage Run Configuration View
Click on Switch.
ZEBRA TECHNOLOGIES 65
Note : By default breakpoint is enabled in the zip provided. Hence, please resume so that the RFID
application comes out of the breakpoint.
Note : On Photon eclipse , remote system explorer does not support SSH terminal. Hence, we need
to switch to Java perspective to visualise the output of RFID application on terminal window.
ZEBRA TECHNOLOGIES 66
The application runs and displays the terminal output in the terminal view.
ZEBRA TECHNOLOGIES 67
Enter Folder name as “META-INF” and click on Finish.
Right click on META-INF in the package explorer view and select New and click on File.
ZEBRA TECHNOLOGIES 68
Expand the Project Name (RFIDSample4App), Select META-INF folder and enter File name as
MANIFEST.MF and click on Finish.
Open the MANIFEST.MF file under META-INF folder in the package explorer view, add the following
3 lines with the valid-main-package and main-class-name, hit enter and save the file.
Manifest-Version: 1.0
Class-Path: . /platform/lib/Symbol.RFID.API3.jar
Main-Class: [main-package-name].[main-class-name]
ZEBRA TECHNOLOGIES 69
8.7.2 Create and export the JAR executable:
Right click on the project name and select export.
In the Export select window, Expand Java and select JAR file.
Click Next.
ZEBRA TECHNOLOGIES 70
Select the desired folder where the JAR file needs to be exported.
build\ (application_name).jar
For example :
“C:\Zebra-FXSeries-Embedded-SDK\samples\java\build\RFIDSample4App.jar”
Note: In the select the resources to export section, only select src and META-INF folder. Also, make
sure .classpath and .project checkboxes are enabled as per the screenshot below.
Click Next
ZEBRA TECHNOLOGIES 71
In the JAR Packing option window, select Next.
Select the Use existing manifest from workspace radio button and select Browse to browse for the
MANIFEST.MF file.
ZEBRA TECHNOLOGIES 72
Expand the both project name followed by META-INF folder and select MANIFEST.MF file.
Select OK.
Note: Select Yes if required to create the build folder and continue.
ZEBRA TECHNOLOGIES 73
Note : If there is a Confirm Create popup for JAR file, please click on Yes button.
If compile warning appears (as during the build), Select OK to continue if the warnings are
acceptable.
ZEBRA TECHNOLOGIES 74
EMBEDDED JAVA INSTALLATION PACKAGE SCRIPT
1. Start_appname.sh : This script starts the executable once the application deb package is
installed on the RFID reader using web browser application console. The creation of deb
package is mentioned in section 9
2. Stop_appname.sh : This script stops the executable once the application deb package is
removed using the web browser application console.
Note: Execute ‘dos2unix’ tool for converting to unix text file format on scripts file. (For
Windows,
it is downloaded from https://sourceforge.net/projects/dos2unix/)
ZEBRA TECHNOLOGIES 75
EMBEDDED APPLICATION INSTALLATION PACKAGE CREATION
1. In eclipse Select Tools > FXSeries Application Package Builder > Execute.
Figure 120 : FXSeries Tools Selection
ZEBRA TECHNOLOGIES 76
7. Enter any Package Dependencies (up to 10) if this applies. After entering the last dependency the
After successful creation the package install file with the name [appname]_[version].deb is copied
into the folder [Embedded SDK Install folder]\buildPackages\all_build.
ZEBRA TECHNOLOGIES 77
9.2 Install and Uninstall Application Package on Zebra RFID Reader
Below listed steps will help in installing and uninstalling application package on RFID reader
Step 1 : Application -> Install New Package -> Browse (Select the created deb package) .
Step 2 : Application package should be listed in List of installed apps as shown in figure below.
Step 3 : Click on Start or Stop circular button to Start or Stop the application executable.
Step 4 : To Uninstall or remove application package, click on uninstall button in the figure below.
From Reader login as ‘rfidadm’ and execute installed RFID sample application as ‘java -jar
/apps/RFIDSample4App.jar’.
Note: Start and stop circular button/auto start of RFID sample application ‘RFIDSample4App.jar’ is
not applicable from RFID web consle, since application need user input from console.
ZEBRA TECHNOLOGIES 78