Java ME Stub v.1.1
==================
The Java ME Stub is a simple application that can be used as a template for
Java ME code snippets and example applications. It contains the following
features:
- Logging information onto the screen
- Logging information into a file
- Displaying a message box that can be used to show text to the user
- A menu with items for executing an example snippet and exiting the
application
FILES
-------------------------------------------------------------------------------
- dist/JavaMEStub.jad
The application descriptor
- dist/JavaMEStub.jar
The installable stub application
- src/StubMIDlet.java
The source file for the MIDlet
KNOWN ISSUES
-------------------------------------------------------------------------------
None.
DESIGN CONSIDERATIONS
-------------------------------------------------------------------------------
- The Others directory (C:\Data\Others) would be the best place for logs.
However, it cannot be accessed through properties such as "fileconn.dir", so
the picture directory (C:\Data\Images or similar) is used instead. This is
not the most logical place for logs, but it will do.
USING THE STUB WITH IDES
-------------------------------------------------------------------------------
NetBeans IDE 6.5
~~~~~~~~~~~~~~~~
1. Extract the stub package (e.g., JavaMEStub_v_1_1.zip).
2. Start NetBeans IDE.
3. Select File > New Project.
4. Select Java ME > Mobile Project with Existing MIDP Sources. Click Next.
5. The Sources Location field should contain the source code folder. Browse to
the source folder under the folder into which you extracted the package. For
example, if you extracted the package into "C:\MyFiles\JavaMEStub\", write
"C:\MyFiles\JavaMEStub\src" into the Sources Location field.
6. JAD/Manifest Location: Browse to the dist folder under the stub folder and
select the JAD file in the folder (e.g.,
"C:\MyFiles\JavaMEStub\dist\JavaMEStub.jad").
7. Click Next.
8. Enter the name for the project and select its location. Click Next.
9. Select the emulator platform (e.g., S60 5th Edition SDK v1.0) and the device
(e.g., S60Device) that you want to use.
10. Select the device configuration and device profile that match your device.
11. Click Finish. The project is imported into NetBeans.
Eclipse Ganymede (Eclipse 3.4.2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Extract the stub package (e.g., JavaMEStub_v_1_1.zip).
2. Start Eclipse Ganymede.
3. Select File > New > Project.
4. Select Java ME > MIDlet Project. Click Next.
5. Enter the name for the project.
6. Select "Create project from existing source" and browse to the root folder
of the stub (e.g., "C:\MyFiles\JavaMEStub").
7. Add the project configurations which you want to use. Through Add > Manage
Devices, you can import new devices if you need them.
8. Click Next.
9. Select the libraries that you want to include in your project classpath and
click Next.
10. Review the directory structure and change it if necessary.
11. Click Finish. The project is imported into Eclipse.
12. A new application descriptor was created by Eclipse, so it does not refer
to the correct one in the dist folder. Copy the contents of the original
descriptor ("dist\JavaMEStub.jad") over the created descriptor. The
original descriptor can be deleted after this.
RUNNING THE APPLICATION
-------------------------------------------------------------------------------
Launch the application on your device. A screen displaying a text field is
shown, and the application is ready for use.
When the Execute snippet menu item is selected, the application calls the
executeSnippet() function, which by default displays a string in the text
field, logs the string into a file under the pictures folder of the device
(e.g. C:\Data\Images), and shows an information alert to the user.
COMPATIBILITY
-------------------------------------------------------------------------------
- Java ME devices supporting CLDC 1.1 configuration and MIDP 2.1 profile
Tested on:
- Nokia N96
- Nokia 5800 XpressMusic
VERSION HISTORY
-------------------------------------------------------------------------------
1.1
- Fixed permission issues related to file logging
- Added displaying the info dialog
1.0
- Initial release