Creating a New CDC Application for Windows CE (Using the CrEme VM)

Requirements needed

Software or Resource Version Required
NetBeans IDE with Java ME Version 6.5 or
version 6.1
Java Development Kit (JDK) Version 6 or
version 5
Sun Java Toolkit for CDC 1.0

Creating an Application

  1. Choose File > New Project (Ctrl+Shift+N) from the main window.
  2. Under Categories, select Mobility. Under Projects, select CDC Application. Click Next.Creating a new cdc project in NetBeans IDE
  3. In the Name and Location Page, name the project cremeapp. Click Next.
  4. In the Select Platform Page, choose pJSCP V4.10. Click Finish.
    Selecting the CrEme VM in the IDEs new project wizard
  5. In the Project window, right-click on the Source Packages node of your project and choose New > JFrame form. Click Finish. The NetBeans GUI Builder (Matisse) displays the new form.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);
  6. 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.

Java SDK Directory Structure

This section introduces the Directory and file structure of SDK (Software Development Kit). The following figure shows jdk1.5.0 software stored in ‘c’ directory that has multiple subdirectories like bin, demo, include and jre etc. to hold all important developing and testing tools. See detail information bellow.

SDK Directory Structure:

Subdirectories of the SDK:

The jdk1.5.0 has following directory:

Bin directory – The bin directory provides all inessential tools for developing and testing the program through the help of command provided by Java compiler.

Demo directory – This directory consists many applications and applets with source code. 

Include directory – It contains all header files like for ‘C’ programming language that enables you to combine C code into a Java program.

Jre directory When you run any java program then you have to compile it by the help of  Java interpreter or Java Runtime Environment (JRE). The SDK uses the internal adaptation of JRE, which containing in the jre root directory.

Lib directory – This is a most important directory for development tools that contains libraries and it’s supported files.

Docs directory – It is the last directory of Software Development Kit that assists you to store the Java documents. The docs directory is an optional directory.

Files of the SDK:

JDK1.5.0 directory has following files that provide the detail information about it.

README.html : The jdk1.5.0 directory provides an html file that contains the detail information of SDK shown on the web browser. This file contains all system requirements, features and documentation links to represents all information’s about the jdk1.5.0. The zip file is a collection of one of more files that has been compressed or stored to ‘.zip’ extension. Similarly, the scr.sip file contains the source code of SDK. It become necessary to extract the file that contain the source code from the ZIP file.