With project templates, the IDE controls all aspects of how your
application is built, run, and debugged. You set a project's source directory,
classpath, emulator platform, and other project settings when creating
the project and in the Project Properties dialog box.
When the project is created, the IDE:
Creates a source tree you can examine in the Projects or Files views.
Sets the emulator platform for the project.
Sets the project run and compile-time classpaths.
Creates a build script that contains actions for running, compiling, debugging,
and building Javadoc.
Compiling actions include Java ME platform-specific tasks such as preprocessing, preverification, and obfuscation.
The NetBeans Mobility Pack comes with the following Java ME MIDP templates:
Mobile Application. An empty Java ME MIDP project with a
main class. You can choose to create the project with a Hello MIDlet as well.
Choosing the Hello MIDlet opens the Mobility
Visual Designer.
Mobile Class Library. An empty Java ME MIDP class library
with no main class.
Use this template to create a library within an existing
project.
Mobile Project from Existing MIDP Sources. A Java ME MIDP
project created from an existing source folder.
Import Wireless Toolkit Project. A Java ME MIDP project that
imports a project created previously in the J2ME Wireless Toolkit.
Import Mobility Studio Project. A Java ME MIDP project that
imports a project created previously in a version of the Sun Java
Studio Mobility.
File Templates
With file templates, you specify a project, file name and location. The
IDE creates the basic structure of the file, and adds it to the Application
Descriptor file. Besides standard file templates known from J2SE projects
(for example, Java class, Java interface, XML file, and others), the Java ME
MIDP project offers the following templates:
Visual MIDlet. A MIDlet template that opens the Visual
Mobile Designer.
MIDlet. A basic executable class for a mobile device.
MIDP Canvas. Creates a subclass of the Canvas class. The
Canvas class gives full control over the appearance of the user interface,
but may not be portable across devices.
Localization Support Class. Creates a LocalizationSupport.java
file and a messages.properties file where you add keys and values
for localized elements of the UI.
Hello Visual MIDlet. A MIDlet that displays text on the
screen of a device. This MIDlet template opens the Mobility Visual Designer.
Mobile Client to Web Application. A wizard that creates
all the code needed to access a web application from a MIDP application. It
generates a servlet and a Java ME class that connects to an existing web application
through the servlet. Optionally, you can use the wizard to create a mobile
client that uses an existing web service through servlet middleware.
J2ME Web Services Client. A wizard that creates the code
to access Web services using the
standard.