helpinghand
search
needassistance
 
How To
MIDP application with Wireless Toolkit on Windows
Categories: JDBC, Programming Examples, Tools and Interfaces
Introduction

A simple way to develop MIDP applications is to use your favorite source code editor (such as Emacs) and build, package and sign your application using the Sun Wireless Toolkit.

This article describes how to make your application access the Mimer MIDP libraries when using Sun Wireless Toolkit for Windows.

The critical component is the file named MIDJDBC2.JAR, located in the J2ME subfolder of the Mimer installation directory. Depending on which version of the Sun Wireless Toolkit you are using, this file should be copied into different locations.

In the text below, {wtkdir} denotes the installation directory of the Sun Wireless Toolkit.
Description

Sun Wireless Toolkit 2.2 and earlier

Older versions of the Wireless Toolkit searched for external libraries in the folder named:

{wtkdir}\apps\lib

Just copy the MIDJDBC2.JAR file to this folder, and your projects should build successfully.


Sun Wireless Toolkit 2.5

Version 2.5 of the toolkit introduced the possibility to manually select which libraries to include in a project. This is done from the Project Properties.

Also, the {wtkdir}\apps\lib folder that was used earlier has changed its meaning. Libraries located in this folder are now only used for development and testing, not to be included when packaging applications. The correct location here is:

{wtkdir}\lib\ext

Once the MIDJDBC2.JAR is placed in this directory, you may enable the library for use and bundling. Select the "Settings" button, and then "External APIs". This is how it appears on screen.



In this case, the Mimer MIDP library has been enabled both for use and bundling. Enabled for use means that the library is included in the classpath, and enabled for bundle means that the library is included in the packaged application.


Sun Wireless Toolkit 2.5.2

Version 2.5.2 introduces a multi-user development feature that may feel confusing if you are used to older versions of the toolkit.

Now, the toolkit makes a private copy of the toolkit file tree in each users profile directory. Therefore, in order for the toolkit to recognize the Mimer MIDP library, it has to be found there. The correct location of the Mimer MIDP library is:

%USERPROFILE%\j2mewtk\lib\ext

Once the library is found in this folder the process of enabling the library for use and bundling is the same as in version 2.5. %USERPROFILE% is the environment variable USERPROFILE which holds the name of the profile folder for the current user, usually something under C:\DOCUMENTS AND SETTINGS.
Links

For details on Sun Java Wireless Toolkit, please visit www.oracle.com/technetwork.
Last updated: 2009-02-18

 

Powered by Mimer SQL

Powered by Mimer SQL