Sun java wireless toolkit

Sun java wireless toolkit

This book describes how to use the Sun Java TM Wireless Toolkit for CLDC.

The Sun Java TM Wireless Toolkit for CLDC is a set of tools that makes it possible to create applications for mobile phones and other wireless devices. Although it is based on the Mobile Information Device Profile (MIDP) 2.1, the Sun Java TM Wireless Toolkit for CLDC also supports many optional packages, making it a widely capable development toolkit.

The Sun Java Wireless Toolkit 2.5.2 for CLDC can be installed on a system running a supported version of either Windows or Linux. All users with an account on the host machine can access the toolkit, either singly or simultaneously.

1.1.1 The Installation Directory and the Working Directory

Windows paths include a drive letter and use backslashes as directory separators. Linux paths use forward slashes. In Linux paths, ~ represents a Linux user’s home directory.

To support multiple users the toolkit creates an installation directory that is used as a source for copying. This document uses the variable workdir to represent the toolkit working directory and toolkit to represent the installation directory. Each user’s personal files are maintained in a separate working directory named j2mewtk that has a subdirectory for each version installed. The default location of workdir is typically in one of these locations:

C:\Documents and Settings\ User \j2mewtk\2.5.2
(where User is your account name)

~/j2mewtk/2.5.2 (where ~ is your home directory)

Читайте также:  Простые числа в массиве питон

Prominent differences between Windows and Linux are described in the documentation. If only one operating system is mentioned, you can assume the above path notation differences apply.

1.1.2 Working Directory Files

At installation time the installer copies a subset of files from the installation directory to the working directory of each user. The working directory contents are as follows:


    .settings — Initially contains security.properties .

All the source code for the demonstration applications is available in toolkit \apps , and each demonstration has its own project directory. Any applications placed in toolkit \apps are visible to all users.

For example, on Windows the source code for the MobileMediaAPI demonstration is in toolkit \apps\MobileMediaAPI\src . When you use the Open Project command, you can see projects in the installation directory and your working directory (if they exist). As shown in FIGURE 1-1, projects in your local directory are shown in bold font, and projects in the installation directory are shown in italic font. To see only your local files, clear the Show available demos check box.

FIGURE 1-1 Project Listing Shows Local Projects in Bold Face

When you open a project from the installation directory, a copy of the application is imported into workdir \apps . Often the import process is undetectable, but on slower machines you might see a progress dialog like that in FIGURE 1-2. Any customizations should be made to your local copy.

FIGURE 1-2 Project Import from toolkit to workdir

To get started right away, try the demonstration applications that are included with the Sun Java TM Wireless Toolkit for CLDC.

To run the demonstrations, start the toolkit as follows.



      On Microsoft Windows choose Start > Programs > Sun Java Wireless Toolkit 2.5.2 for CLDC > Wireless Toolkit 2.5.2. [1]

    A window similar to FIGURE 1-3 opens.

    FIGURE 1-3 Toolkit User Interface

    Click the Open Project button to see a list of all the available applications. As shown in FIGURE 1-1, italicized names denote applications stored in the installation directory, and bold names, if any, are stored in your working directory. Pick one of them and click the Open Project button in the dialog. If you have not opened this project before, a copy will be created in your working directory, as discussed in Section 1.1.2, Working Directory Files.

    Once the application is open, press the Run button. The emulator appears running the example application.

    Most demonstrations are self explanatory, but some have additional instructions. Some demos require you to use Project > Run via OTA instead of run. See Appendix A for general instructions and descriptions of demos.

    The Sun Java TM Wireless Toolkit for CLDC has three main components:


      The user interface automates many of the tasks involved in creating MIDP applications.

    From the user interface you can build applications, launch the emulator, and start the utilities. Alternatively, the emulator and utilities can be run by themselves, which is useful in many situations. If you want to demonstrate MIDP applications, for example, it’s useful to run the emulator by itself.

    The only additional tool you need is a text editor for editing source code.

    The Sun Java TM Wireless Toolkit for CLDC supports the creation of MIDP applications with the following main features:


      Building and packaging : You write the source code and the toolkit takes care of the rest. With the push of a button, the toolkit compiles the source code, preverifies the class files, and packages a MIDlet suite.

    At installation you are given the option to activate the Check for Product Updates feature. This feature uses the network to check for an update every seven days. To determine whether an update is needed, it collects the following information:

    To activate or deactivate this feature, select Edit > Preferences and click Network Configuration. Towards the bottom of the panel, check or uncheck the Check for updates box.

    The Sun Java TM Wireless Toolkit for CLDC supports many standard Application Programming Interfaces (APIs) defined through the Java Community Process (JCP) program. TABLE 1-1 shows the APIs and includes links to the specifications.

    TABLE 1-1 Supported JCP Program APIs

    Mobile Service Architecture

    Источник

    Sun java wireless toolkit

    WTK 2.5.2 has been integrated into Java ME SDK 3.0. While you are welcome to use WTK 2.5.2, we highly recommend the newer feature-rich Java ME SDK 3.0.

    The Sun Java Wireless Toolkit (formerly known as J2ME Wireless Toolkit) is a set of tools for creating Java applications that run on devices compliant with the Java Technology for the Wireless Industry (JTWI, JSR 185) specification and the Mobile Service Architecture (MSA, JSR 248) specification. It consists of build tools, utilities, and a device emulator.

    What’s in WTK 2.5.2

    The Sun Java Wireless Toolkit implements impressive capabilities which are exposed through standard APIs. The APIs are defined through the Java Community Process (JCP):

    • Mobile Service Architecture (JSR 248)
    • Java Technology for the Wireless Industry (JTWI) (JSR 185)
    • Connected Limited Device Configuration (CLDC) 1.1 (JSR 139)
    • Mobile Information Device Profile (MIDP) 2.0 (JSR 118)
    • PDA Optional Packages for the J2ME Platform (JSR 75)
    • Java APIs for Bluetooth (JSR 82)
    • Mobile Media API (MMAPI) (JSR 135)
    • J2ME Web Services Specification (JSR 172)
    • Security and Trust Services API for J2ME (JSR 177)
    • Location API for J2ME (JSR 179)
    • SIP API for J2ME (JSR 180)
    • Mobile 3D Graphics API for J2ME (JSR 184)
    • Wireless Messaging API (WMA) 2.0 (JSR 205)
    • Content Handler API (JSR 211)
    • Scalable 2D Vector Graphics API for J2ME (JSR 226)
    • Payment API (JSR 229)
    • Advanced Multimedia Supplements (JSR 234)
    • Mobile Internationalization API (JSR 238)
    • Java Binding for the OpenGL(R) ES API (JSR 239)

    The Sun Java Wireless Toolkit 2.5.2 includes all of the advanced development features found in version 2.2, 2.5, 2.5.1 such as MIDlet signing, certificate management, integrated over-the-air (OTA) emulation, push registry emulation, and more.

    This release of the Sun Java Wireless Toolkit includes Nokia’s Scalable Network Application Package (SNAP) Mobile API and the SNAP Mobile Sample Application as part of the toolkit’s External API feature. SNAP Mobile is a combination of client software and server infrastructure that supports the creation of networked, community-enabled multiplayer games. Please see SNAP Mobile Emulation Environment Installation for further information.

    Note: Sun Java Wireless Toolkit Version 2.5.2_01 for CLDC is a Security Update that corrects vulnerabilities that might allow an untrusted application to execute arbitrary code. The vulnerability can only be exploited if you obtain a malicious program and run it in an earlier version of the toolkit. The only change in version 2.5.2_01 is the security update, so references to version 2.5.2 on this page and in the documentation correctly identify the most recent feature release. The version 2.5.2 documentation (included in the download) remains valid.

    System Requirements — Software

    • Microsoft Windows XP and Linux-x86 (English version tested with Ubuntu 6.x)
    • The following libraries should be present on the system running Ubuntu v6.x:
      • ibXpm (libxpm-dev)
      • libXt (libxt-dev)
      • libX11 (libx11-dev)
      • libICE (libice-dev)
      • libSM (libsm-dev)
      • libpthread (libc6-dev)
      • libm (libc6-dev)
      • libnsl (libc6-dev)
      • libstdc++6-dev

      System Requirements — Hardware

      Minimum hardware requirements are:

      Installing the Sun Java Wireless Toolkit for CLDC on Windows

      First ensure you have an appropriate Java SE environment installed, as described previously.

      Run the installer, sun_java_wireless_toolkit-2_5_2-windows.exe . Follow the instructions provided by the installer.

      Installing the Sun Java Wireless Toolkit for CLDC on Linux

      First ensure you have an appropriate Java SE environment installed, as described previously.

      Run the installer, sun_java_wireless_toolkit-2_5_2-linux.bin . Follow the instructions provided by the installer.

      Download Sun Java Wireless Toolkit 2.5.2_01 for CLDC for Windows and Linux

      Community involvement

      Check out the Mobile and Embedded Community site for application developers where application developers can get Java ME mobile development information and have their applications showcased for the community to see.

      SNAP Mobile Emulation Environment Installation

      Please note that the SNAP Mobile Emulation Environment needs to be downloaded, installed and started in order to successfully run the SNAP Mobile Sample Application. To download and run the Emulation Environment:

      • Go to http://www.forum.nokia.com/games/snapmobile and log in (or create an account first if necessary)
      • Select «SNAP Mobile SDK» from the «Tools and SDKs» section
      • Download installer and run
      • Go to: «\SNAPMobile\tools\ServerEmulator\»
      • Under Windows, run «emu.bat»

      Источник

Оцените статью