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.
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.
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.
© IBM Corporation 2002. All Rights Reserved