CDC applications are designed to run on mobile and embedded devices with at least 2MB of memory. This configuration supports a more feature-rich Java Virtual Machine (JVM) than MIDP-based mobile phones, which typically have 128 to 512KB of memory and use the Connected Limited Device Configuration (CLDC). This tutorial shows you how to use NetBeans IDE to create a Java Micro Edition (Java ME), Connected Device Configuration (CDC) application for deployment on a Windows CE device using NSICom's CrEme Virtual Machine. This document is designed to get you creating applications as quickly as possible.
You must have the NetBeans IDE 6.0 or 6.1 Mobility or Full edition (download) and the Java Standard Development Kit (JDK) version 5.0 or 6.0 (download) installed before you can start. You also need the Sun Java Toolkit for CDC or other CDC emulator platform installed and registered in the IDE to develop CDC applications. See the CDC Emulator Platform Setup Guide for more information. If you are new to NetBeans Mobility, you should start with the NetBeans Mobility CDC Quick Start Guide before continuing.
Instructions for adding emulator platforms are listed in the NetBeans CDC Emulator Platform Setup Guide.
The following emulator platforms and tools are required for this tutorial:
The NSIcom CrEme VM enables you to create and run Java Swing applications for devices running Windows CE.

cremeapp. Click Next. In the Select Platform Page, choose pJSCP V4.10. Click Finish.
![[image]](http://mowser.com/img?url=http%3A%2F%2Fwww.netbeans.org%2Fimages%2Fmobility%2F60%2Fcdcqs%2Fcreme-gui.png)
Note: Make sure that the first fragment of code in the main() method is as is shown below when you are going to run the application in CrEme default emulator. This make sure that Swing is loaded.
try {
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());} catch(Exception exception) {
System.out.println("Error loading L&F: " + exception);
}
Use the Project Matisse GUI builder to create your application. You can use the Project Matisse GUI Builder in the same way you use it for regular J2SE development.
Note that if there is an exception that crashes the emulator, the emulator prints it to the standard output window and waits for a key press. You cannot, however, send the keypress from the IDE. You must instead kill the VM from the Process Explorer.
Choose Start > Programs > Microsoft Windows Mobile 5.0 MSFP Emulator Images > Device Emulator Manager. This opens the Device Emulator Manager.
In the Device Emulator Manager, choose Actions > Cradle. Open ActiveSync by clicking on the icon in the Application tray. If you do not have ActiveSync installed, download and install it as described in the NetBeans CDC Emulator Platform Setup Guide. When you open ActiveSync, it detects and connects to the device or the device emulator. If it does not:
CrE-ME410_swing.CAB) for your device from NSIcom (download). To install the Swing extensions on your device or device emulator:
CrE-ME410_swing.CAB into the Explorer window. In the device or device emulator, choose Start > Programs > File Explorer. Start CrE-ME410_swing.CAB.
Choose Run > Run Main Application.In addition to the IDE's built-in help documentation about Java ME CDC development, tutorials and articles about using NetBeans for mobile development can be found at the following location:
You are viewing a mobilized version of this site...
View original page here