by PCM Reddy
The following procedure demonstrates how to run a Connected Device Configuration (CDC) application on a Windows Mobile device running the CrEme VM with NetBeans IDE.
Creating user interfaces with NetBeans Mobility Pack 5.5 for CDC is made easier thanks to Project Matisse, the NetBeans GUI Builder. This document shows you how to create a login screen for CDC devices using two of the emulators available for the Mobility Pack for CDC. The Nokia and Sony Ericsson emulators included in their respective SDK's both use the AWT-based JSR-62 standard for Personal Profile 1.0. Device support for AGUI-backed SWING as defined in JSR-209 is still limited, but for this demonstration the Sun Java Wireless Toolkit emulator bundled with the CDC pack is sufficient. It's important to understand that AGUI and Personal Profile have nearly identical capabilities for creating GUI's. The reason for using one or the other depends on which device your application is deployed on.
This tutorial assumes you have some basic understanding of, or programming experience with, the following technologies:
Before you begin, you need to install the following software on your computer.
This tutorial assumes your system has Windows XP, JDK 1.6, NetBeans 5.5.1 and Mobility Pack for CDC 5.5.1 installed. You also need to install NISCom's CrEme VM http://www.netbeans.org/community/releases/55/1/mobilitycdc-install.html#emulators on both desktop and on your Mobile PC. Make sure your device is connected to the computer where NetBeans 5.5.1 CDC Pack is running. In this example, a USB cable was used to connect the Desktop PC to the Windows Mobile Phone.
1. Start NetBeans IDE. Make sure NISCom <http://www.nsicom.com/> CrEme VM <http://www.nsicom.com/Default.aspx?tabid=138> is added to Java Platforms)
2. Connect your Windows Mobile device to the machine where you are running NetBeans ( I used USB cable to connect)
3. Create a CDC application select pJSCP V4.10 platform, uncheck creation of visual form. (See CDC Quick Start for details.)
4. http://blogs.sun.com/pcmreddy/resource/niscomsettings.JPG
5. Select Project and click on properties
6. Select platform and click on "CrEme" tab in right side panel.
7. Check option Run in Remote VM as shown in picture. (If there is a problem, NetBeans displays the error message in this screen)
8. http://blogs.sun.com/pcmreddy/resource/niscomsettings.JPG
9. Add AWT form add your components. (or you can use attached application sources).
10. Compile and deploy to target device.
11. Check application is deployed on device using file explorer on the device.
12. Now select the project and run the application.
13. On the Mobile device NISCom CrEme VM loads a splash screen will appear and application starts on device.
14. Once application exits, NetBeans run process stops and there will be an out put message in out put window.
I created a simple temperature conversion application which converts temperature from Fahrenheit to Celsius. I am able to run this application on a Cingular 8525 http://business.cingular.com/businesscenter/8525/index.jsp (which is same as HTC TyTN http://www.europe.htc.com/products/htctytn.html) from NetBeans.
http://www.netbeans.org/community/issues.html
In this exercise, you learned how to perform the following tasks:
You can also watch this video, which shows an application created in NetBeans running on a device.
| app-on-handset.jpg | ![]() |
135829 bytes |
| application.jpg | ![]() |
68174 bytes |
| apprunninginemulator.jpg | ![]() |
39010 bytes |
| cdc-creme-template.jpg | ![]() |
43866 bytes |
| code.jpg | ![]() |
116328 bytes |
| mycremeapp.zip | ![]() |
14487 bytes |
| platform.jpg | ![]() |
57246 bytes |
| remotevmsettings.jpg | ![]() |
38821 bytes |