Adding J2ME™ Platform Support to the NetBeans™ IDE

Updating the NetBeans™ IDE with the Mobility Modules for NetBeans integrates support for developing and testing applications for mobile devices that use the Java™ 2, Micro Edition (J2ME™) platform.

Included Modules
Installing the Mobility Modules
Installing the ProGuard Obfuscator
Configuring the Palm OS Emulator

Included Modules

The included modules are:

  • kjava.nbm - J2ME Wireless Module. Supports MIDP/CLDC development, providing various templates, emulator integration, compilation, execution and debugging.
  • kjava-emulator - J2ME Wireless Toolkit 1.0.4_01 Module. Provides emulation for the MIDP-1.0/CLDC 1.0 platform and various monitoring features. The J2ME Wireless Toolkit modules are provided for the Solaris, Linux, and Windows platforms, and are named kjava-emulator_sol.nbm, kjava-emulator_linux.nbm, and kjava-emulator_win.nbm.
  • wtk21.nbm - J2ME Wireless Toolkit 2.1 Module. Provides emulation for the MIDP 2.0/CLDC 1.1 platform, including security standards and support for applications that use the Wireless API (WAPI) and Multimedia API (MMAPI).The J2ME Wireless Toolkit modules are provided for the Solaris, Linux, and Windows platforms, and are named wtk21_solaris.nbm, wtk21_linux.nbm, and wtk21_windows.nbm.
  • kjava-obfuscator-retroguard.nbm - RetroGuard Integration Module. Provides integration support for the RetroGuard obfuscator. The RetroGuard obfuscator is included in the module.
  • kjava-obfuscator-proguard.nbm - ProGuard Integration Module. Provides integration support for the ProGuard obfuscator. After you add this module, you must also download and add the ProGuard obfuscator as described below.
  • kjava-examples.nbm - Examples Module. Provides sample MIDP applications that demonstrate the features and APIs supported by

Installing the Mobility Modules

To install the Mobility modules:

  1. Select Tools > Update Center.
    This opens the Update Center wizard.
  2. On the first page of the wizard, select the Install Manually Downloaded Modules (.nbm files) radio button. Follow the wizard instructions to download and install the following modules from the Update Center:
    • Required:
      • J2ME Wireless module
      • J2ME Wireless Toolkit 2.1 module for your platform.
    • Optional:
      • J2ME Wireless Toolkit 1.0.4_01 module for your platform.
      • RetroGuard Integration module
      • ProGuard Integration module
      • Examples module

    If any of the modules are not visible in the Update Center, they are already installed.

    Note that the RetroGuard and ProGuard Integration modules are optional. If you choose to install them, the menu choice, "Obfuscators" is available from the Tools menu after the modules are installed.

    Also note that the RetroGuard obfuscator is included with the Mobility modules. To use the ProGuard obfuscator, you must download the obfuscator and install it, as described below.

Installing the ProGuard Obfuscator

To install the ProGuard obfuscator:

  1. Download the ProGuard obfuscator (proguard2.0.1.tar.gz or proguard2.0.1.zip) from http://proguard.sourceforge.net/.
  2. Untar or unzip the file into a directory on your system.
  3. Add the ProGuard obfuscator using the Obfuscator Registry:
    1. Choose Tools > Obfuscators. The Obfuscator Registry dialog opens.
    2. In the right pane of the dialog, select the node for the obfuscator you want to install. The Property sheet for the obfuscator is displayed in the left pane of the dialog.
    3. Click on the ellipsis (...) button for the Obfuscator Executable property. A File Chooser window opens.
    4. Use the File Chooser window to navigate to the JAR file for the obfuscator (for example, proguard.jar) and click OK. The path to the JAR file is shown in the property sheet.
  4. You can now integrate obfuscation into your compilation process, as described in the Mobility modules' online help.

Configuring the PalmOS Emulator

If you want to run the Palm OS Emulator that is included with the J2ME Wireless Toolkit 1.0.4, you must install the emulator before installing the NetBeans IDE. You can download the emulator from http://www.palmos.com/dev/tech/tools/emulator/.

You must first configure the emulator as follows:

  1. Redirect NetLib calls to the host’s TCP/IP.
    For certain functions like debugging and Internet connectivity to work, you must set NetLib API calls to be redirected from the Palm OS Emulator to use your computer’s TCP/IP.

    1. Run the Palm OS Emulator and right-click the emulator.
      A menu appears.
    2. Select Settings > Properties…

    3. The Properties dialog appears.
    4. Check the Redirect NetLib calls to host TCP/IP box, and click OK.
      The Properties dialog disappears.
    5. Right-click the emulator and select Save.
      Your changes are saved.
  2. Disable debugging.
    The Palm OS Emulator allows various items to be debugged while the application executes. However, for the Palm OS Emulator to work with the Sun Java Studio Mobility IDE, debugging must be disabled altogether.
    1. Run the Palm OS Emulator, and right-click the emulator.
      A menu appears.
    2. Select Settings Æ Debugging…
      The Debug Options dialog appears.
    3. Uncheck all the boxes and click OK.
      The Debug Options dialog disappears.
    4. Right-click the emulator and select Save.
      Your changes are saved.
  3. Set the Palm OS Emulator location in the IDE.
    The first time you run an application using the Palm OS Emulator through the IDE, a dialog appears, asking you for the Palm OS Emulator location. After you set the location, the dialog will not appear again when you run MIDP applications using the emulator.

Legal Notices

Copyright © 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries.

This document and the product to which it pertains are distributed under licenses restricting their use, copying, distribution, and decompilation. No part of the product or of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.

Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.

Sun, Sun Microsystems, the Sun logo, Forte, Java, NetBeans, iPlanet, docs.sun.com, the Sun ONE logo, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.

Federal Acquisitions: Commercial Software - Government Users Subject to Standard License Terms and Conditions.

DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Copyright © 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, Etats-Unis. Tous droits réservés.

Sun Microsystems, Inc. a les droits de propriété intellectuels relatantsà la technologie incorporée dans le produit qui est décrit dans ce document. En particulier, et sans la limitation, ces droits de propriété intellectuels peuvent inclure un ou plus des brevets américains énumérésà http://www.sun.com/patents et un ou les brevets plus supplémentaires ou les applications de brevet en attente dans les Etats - Unis et dans les autres pays.

Ce produit est un document protege par un copyright et distribue avec des licenses qui est en restreignent l'utilisation, la copie, la distribution et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, parquelque moyen que ce soit, sans l'autorisation préalable et écrite de Sun et de ses bailleurs de licence, s'il y en a.

Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun.

Sun, Sun Microsystems, le logo Sun, Forte, Java, NetBeans, iPlanet, docs.sun.com, the Sun ONE logo, et Solaris sont des marques de fabrique ou des marques déposées de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pays.

LA DOCUMENTATION EST FOURNIE "EN L'ÉTAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFAÇON.

 

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo