# Jbed for Windows Mobile RI readme

This document describes how to install Jbed for Windows Mobile RI on a Windows Mobile device running PocketPC 2005.

- Windows host prerequisites
  - Define environment variables
- Install Jbed for Windows Mobile RI
- Build Jbed for Windows Mobile RI
- Install the build onto the target phone
- Running MIDlets
- Creating shortcuts to run MIDlets
- Disclaimer

## Windows host prerequisites

It is assumed that you are familiar with the tools for the target architecture (i.e. native compiler, cross-compiler, linker and debugger) of your target hardware and can successfully build a simple application in C using the makefile supplied by the OS vendor. You should then be able to download the built application and run it on your hardware. Jbed licensees will require tools for building and testing specific Jbed versions, including:

- ActiveSync (latest version recommended)
- Java™ Development Kit (JDK) - required to build and run Jbed (JDK 1.4.2_05 or later is recommended).
- Perl - required for the build scripts and other utilities (ActivePerl 5.6 is recommended).
- Python - required for the build scripts and other utilities.
- Visual Studio 2005
- Windows Mobile 5.0 SDK for Pocket PC

### Define environment variables

The following are some of the environment variables that need to be defined to build Jbed for Windows Mobile RI:

- `JDK4_PATH` - points to the `bin` directory of JDK 1.4.
- `MASTER` - points to the location of the masterpack on the local hard disk
- `MSDevStudio8` - points to the location of the Microsoft Visual Studio 2005 installation.
- `MSVCVER` - set this variable to 8.
- `PB500_BIN_DIR` - points to the `VC\ce\bin\x86_arm` directory of the Visual Studio 2005 installation.
- `PERLCMD` - points to the location of the Perl executable.
- `PYCMD` - points to the location of the Python executable.
- `WCE500BaseDir` - points to the location of the `Windows CE Tools` directory (made available when Windows Mobile 5.0 SDK is installed).
- `WD` - points to the location of the working directory on your host. If you do not have a WD, set this to an empty directory.

Refer to the Set environment variables document in the Developers Guide for a full listing of environment variables.

Back to top

## Install Jbed for Windows Mobile RI

To install Jbed for Windows Mobile RI, open the self-installer and follow the instructions.

Back to top

## Build Jbed for Windows Mobile RI

To build Jbed for Windows Mobile RI for PocketPC 2005, execute the following command:

      stdbuilds.py -b fbcc_pocketpc2005_nativeui build --wd

Back to top

## Install the build onto the target phone

To install the build onto the target phone, you must first generate a `.cab` file using the `makecab.py` script, located in the `os\win\ce\scripts\` directory. To generate a `.cab` file, execute the following command:

To run the script from the masterpack directory (default):

      makecab.py -m

To run the script from the working directory:

      makecab.py -w

Use the `-h` argument for more options.

The following `.cab` file will then be generated to the `%TARG_PREFIX%\Installer` directory:

      setupJbed.CAB

Then perform the following steps:

1. Download the `.cab` file onto the target device, using ActiveSync.
2. Open the executable from within the target device.
3. Follow the on-screen instructions.

After installation, the Jbed executable will be available in the following directory:

- `\Storage\Program Files\Esmertec\FastBCC`

Select the following shortcut to run the Jbed RI for Windows Mobile:

      jbed

Back to top

## Running MIDlets

For information on how to use the AMS and navigate its menus, refer to the User Guide.

To set the limit for the maximum file system size to 8MB, add `-DFile.maxStorageSize=8m` to the command-line arguments stored in the shortcut that launches Jbed. See example of how to create shortcuts in the next section.

The given <`size`> is the number of bytes to use for the file system (default is 4MB). Adding 'k' or 'm' after the size figure allows for kilobyte and megabyte values, respectively. An example of its use is when running MIDlets that require a larger file system than the default value.

Back to top

## Creating shortcuts to run MIDlets

Using a shortcut on Windows Mobile devices allows command-line arguments to be stored in the Properties of the shortcut, avoiding the need to re-type them every time you want to launch Jbed.

To create a shortcut for a Jbed application, make sure that the ActiveSync connection is established and perform the following steps on your host PC:

1. Open the ActiveSync Explore window:
   - Open the `\Storage\Program Files\Esmertec\FastBCC` directory.
   - Right-click on `jbed.exe` and select Create Shortcut.
     This creates the file `Shortcut to Jbed.exe.lnk`.
2. Copy the new shortcut to your host.
3. Edit the shortcut with a text editor. The content of the shortcut file is:
   `50#"\Storage\Program Files\Esmertec\FastBCC\jbed.exe"`
   where `50#` denotes that there are 50 characters in the string, including the quotes.
4. Change the content to include the full classpath of your MIDlet. For example:
   `90#"\Storage\Program Files\Esmertec\FastBCC\" -classpath "\Windows\testMidlet.jar" testMidlet` (FastBCC)
5. Save the file on your PC.
6. Copy it back to the device using the ActiveSync Explore window.

You can now select the shortcut to run the MIDlet.

Back to top

## Disclaimer

This document, as well as the software described in it, is furnished under license and may only be used or copied in accordance with the terms of such license. Except as permitted by such license, no part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the written permission of Esmertec.

Esmertec, Jbed, Jcap, Jeco, FastBCC, FastDAC, HostBCC and u@ are trademarks or registered trademarks of Esmertec AG.

Copyright © 1998-2007 Esmertec AG.

Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Esmertec is independent of, and in no manner legally affiliated with, Sun Microsystems, Inc. except as a licensee.

All rights reserved for all marks. All use is subject to license terms.

Headquarters:
Esmertec
Lagerstrasse 14
CH-8600 Dübendorf
Switzerland
Phone +41 1 823 89 00
Fax +41 1 823 89 99

Further information about Esmertec and its worldwide offices is available at www.esmertec.com.

## Patents

Jbed Advanced (with FastBCC) is protected by U.S. Pat. Nos: 6,964,039; 6,978,451;

Jbed Advanced (with FastDAC) is protected by U.S. Pat. Nos: 6,766,513; 6,901,587; 6,944,637; 6,976,254; 7,007,005; 7,058,929; 7,069,549;

Jbed Advanced CDC is protected by U.S. Pat. Nos: 6,766,513; 6,862,728; 6,901,587; 6,944,637; 6,976,254; 7,007,005; 7,058,929; 7,069,549;

Back to top