Getting started
This section details how to set up both of the devices that you use and
WebSphere Studio Device Developer (WSDD) to work with those devices.
Palm: What you need to get started
The following are prerequisites required for writing and testing WebSphere MQ Everyplace applications
for the Palm:
- A Palm device or Palm Emulator (you can download POSE from http://www.palmos.com/dev/tools/emulator/)
- A copy of a J2ME virtual machine installed on the Palm, for example the
Sun's K Virtual Machine (KVM) and IBM's J9, available from http://java.sun.com
and http://www.embedded.oti.com
- A cradle to synchronize the palm with your pc
- Something to generate .prc files, that is palm executables, to run on
the plam, such as Sun's J2ME Wireless Toolkit (available at http://java.sun.com)
and IBM's WSDD, available at http://www.embedded.oti.com, which includes J9
as standard
- WebSphere MQ Everyplace JARs/classes
This documentation concentrates on J9 and WSDD.
Palm: Getting started with WSDD
You must complete several tasks before using the palm device or palm emulator
to run WebSphere MQ Everyplace MIDlets:
- Get the virtual machine onto the unit. The .prc files required for this
are located in the C:\IBM\wsdd\wsdd4.0\ive\runtimes\palmos\68k\ive\bin directory
or the equivilant location for your installation. You need the following files:
- j9_vm_bundle.prc
- j9pref.prc
- midp15.prc
- j9_dbg_bundle.prc (only if you are planning to debug an application)
- Once you have installed these files on your palm device (it should come
with instructions on how to do this), use WSDD to create a new MIDlet suite
(in the java perspective - [File][New][Other][J2ME for J9][Create MIDlet Suite]).
- Import the source for the example application into the src directory.
Include the WebSphere MQ Everyplace library in the list of libraries to use, that is right-click
the name of the project in the packages window and select [Properties] [Java
Build Path] and the Libraries tab. Use the 'Add External JARs' option to add
the WebSphere MQ Everyplace MIDP jar to the list. Note the following files are not meant for
use under MIDP:
- mqeexampleapp.msgpump.NormalClient
- mqeexampleapp.msgpump.NormalServer
- mqeexampleapp.msgpump.InputThread
- mqeexampleapp.textapp.Client
- mqeexampleapp.textapp.GatewayServer
- mqeexampleapp.textapp.RegistrationServer
These should be run in Foundation or J2SE to act as commandline implementations
of the clients and servers. There are no MIDP servers as it is not an environment
that servers are designed to run in.
- Set WSDD to run files on that device. With normal palms, an installation
program is provided to enable the installation of new programs from a desktop
computer (e.g. C:\Palm\Instapp.exe). This needs to be set in WSDD in [Window][Preferences][Device
Developer][PalmOS Java Configuration] under PalmOS Install Tool. You also
meed to set the other options in this menu:
- PalmOS Emulator
- This is required if you want to use POSE or a similar PalmOS emulator
- PilRC resource compiler
- This creates the PRC files from the jad and jar. The WSDD help describes
the java options in more detail.
Palm: Building for the Palm in WSDD
Once WSDD has been set up to work with the palm, try building and running
the example application on your palm device. To do this:
- Double-click the wsddbuild.xml file from within your project. If you created
a J2ME for J9 project and not a normal java one, it will appear after all
the packages.
- Select the builds tab from the bottom of the window. Currently, your list
of builds should be empty. This window specifies the platforms you are building
the project for, that is palm, pocketpc, windows, and so on.
- Click Add Build and select the palm option
from the pulldown platforms menu.
- Click Next and enter any creator ID and
a name for the application.
- Click Next again until you reach the final select launcher screen. If you are using a palm device,
select the manual option. If you are using the emulator, select the emulator
option.
- Click Finish and select the launch tab.
Your device should now be a launch option.
PocketPC: What you need to get started
To run WebSphere MQ Everyplace applications on the PocketPC you need:
- A Pocket PC device. Emulators exist, but they are not as true to the original
device as the Palm emulators are to the Palm.
- A copy of a J2ME virtual machine installed on the device. A cradle to
sync the pocket pc with your desktop
- J9 for the Pocket PC comes with WSDD and is located in C:\IBM\wsdd\wsdd4.0\ive\runtimes\pocketpc\arm\ive.
The files required from here are:
- bin\iverel15.dll
- bin\j9.exe
- bin\j9dbg15.dll
- bin\j9dyn15.dll
- bin\j9hook15.dll
- bin\j9midp15.dll
- bin\j9prt15.dll
- bin\j9thr15.dll
- bin\j9vm15.dll
- bin\j9w.exe
- bin\j9zlib15.dll
- bin\swt-win32-ce-2023.dll
- lib\jclMidp
- lib\jclMidp.jxe
These are specified in the WSDD help file. Create a similar directory
structure on the device, for example, program files or wsdd with bin and lib
subdirectories. Then copy the files to the relevant places. Note that the
example application functions under MIDP,hence the need for the jclMidp.jxe
file. The Palm: What you need to get started section
provides details on downloading WSDD.
PocketPC: Getting started with Websphere Studio Device Developer
To run applications on the Pocket PC from WSDD, you need to tell WSDD where
the various files you copied to your device are located. This is done in [Window][Preferences][Device
Developer][PocketPC Java Configuration]. Set the three options to: \Program
Files\WSDD \My Documents\WSDD \Windows\Start Menu, assuming that you copied
the J9 files to '\Program Files\WSDD' earlier
PocketPC: Building for the Pocket PC in Websphere Studio Device Developer
This procedure is almost identical to that described in the Building for the Palm in WSDD section. However, with
the final choice for launcher, choose 'MIDlet Suite on PocketPC Device' rather
than the manual option. This means that the application automatically copies
to the relevant device and runs automatically..