1 Building CS101 JavaDemoApp using NetBeans

kaputmaltwormSoftware and s/w Development

Aug 15, 2012 (5 years and 11 months ago)


1 Building CS101 JavaDemoApp using NetBeans
1.1 Callback-based API 2.0 JavaDemoApp
The file structure of the Callback-based API 2.0 Demo Application Program includes the
following content:
Folder/Files Content
CS101JavaDemoApp Source code of the CS101 java sample programs, including:
• Callback-based API 2.0 JavaDemoApp
Document User Guides and API document.
Java Library The Java Callback-based API 2.0.
Release Binaries All the native library required to run the demo app.

1.2 Software setup on PC
1. Install the latest version of JRE and JDK.
2. Install the latest version of NetBeans IDE.
Reference site: http://java.sun.com/javase/downloads/index.jsp

1.3 Software setup on CS101
1. Install the runtime VM for Wince platform. (CrE-ME 4.12 is used in our example).
2. Install the javax.swing package.
CrE-ME 4.12 is used in our example. User may choose to use different runtime VM
for Wince platform.
Reference site: http://www.nsicom.com/Default.aspx?tabid=295

1.4 J2ME SDK setup on PC
A J2ME SDK has to be installed on PC. In our example, CrE-ME SDK (or Developer
Support) is installed.
Reference site: http://www.nsicom.com/Default.aspx?tabid=295

1.5 Building the JavaDemoApp program
1. Open the Netbeans IDE. Then click “File” ”Open Project…”on the taskbar of
Netbeans to choose the JavaDemoApp project folder.


2. If the Java project cannot be opened by the Netbeans IDE, please install the
following plugins.
Click “Tools”  “Plugins” on the taskbar of Netbeans to open the plugins.
Select “Mobility” under “Name” column and choose “Install” to install the
selected plugin. (Skip this step if the plugin has already installed.)

3. Right click on the project and choose “Properties” on the popup menu. Choose
the “Platform” and make sure the settings are the same as shown in following

If pJSCP is not selectable, press “Manage Emulators” to add the platform as below.
Press the “Add Platform” button.

Select “Java ME CDC Platform Emulator” and click “Next".

Select the folder where the CrE-ME-V4.12 installed and click “Next”.

Click “Finish”.

Click “Close”.

You could now select the “pJSCP” platform as below.

4. Click “Tools”  “Libraries” on the taskbar of Netbeans to open Library

5. Click “New Library…” to create a new library. In our example, we choose
JCSLibrary as the new library name.

6. In the Library Manager, select the JCSLibrary and click “Add JAR/Folder…” to
include the “JCSLibrary.jar” (the high-level java API library) as the classpath.
Then click “OK”.

7. Right click on the “Resources” item under the project tree and choose “Add
Library…”. The following window will be popped up. Select “JCSLibrary” and
click “Add Library”.


8. Right click on the project and choose “Build” on the popup mean. If build
successful, “CS101JavaDemoApp.jar” will be created in the “/(Project
folder)/dist” folder.
9. Connect the CS101 reader to the development PC using USB cable. Make sure
that the ActiveSync has detected the CS101 device after the connection.
10. Create a folder named “CS101JavaDemo” under the “Program Files” folder.
11. Copy all the files under the “Release Binaries” and the
“CS101JavaDemoApp.jar” to the CS101’s “CS101JavaDemo” folder.

12. Make sure that the library files “cpl.dll” and “usbharv.dll” are inside the folder
“\Windows” of CS101. If not, copy them from the “Release Binaries” folder of
the program source code into the CS101 reader.
13. After that, you can now double click the ““CS101JavaDemoApp.jar” to run the
program on the CS101 device.