Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.3 for Eclipse on Windows
E37550-03
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

2 Installing Plugins and Configuring Eclipse

Using the Eclipse integrated development environment, you can create and test embedded applications using a graphical development environment.


Note:

The examples in this chapter use the Eclipse Indigo 3.7 platform.


2.1 Installing the Oracle Java ME SDK Eclipse Plugin

The Oracle Java ME SDK Plugins are the same for both the Indigo 3.7 and Juno 4.2 platforms.

To download the Oracle Java ME SDK Plugins file for Eclipse (oracle-jmesdk-3-3-rr-eclipse-plugins.zip), go to the following location:

http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk

2.1.1 Installing Plugins on Eclipse Indigo 3.7

  1. In Eclipse, go to Help > Install New Software. This displays the Available Software screen, as shown in Figure 2-1.

    Figure 2-1 The Eclipse Available Software Screen

    Description of Figure 2-1 follows
    Description of "Figure 2-1 The Eclipse Available Software Screen"

  2. Press the Add button. This displays the Add Repository window.

  3. In the Add Repository window, press the Archive button to open a file browser.

  4. In the file browser, select the Eclipse plugin file that you downloaded, as shown in Figure 2-2. Click Open to return to the previous dialog.

    Figure 2-2 Selecting Eclipse Plugins

    Description of Figure 2-2 follows
    Description of "Figure 2-2 Selecting Eclipse Plugins"

  5. The Add Repository window appears as shown in Figure 2-3. Press OK.

    Figure 2-3 The Add Repositiory Window with Eclipse Plugins

    Description of Figure 2-3 follows
    Description of "Figure 2-3 The Add Repositiory Window with Eclipse Plugins"

  6. The category Java ME SDK Tools appears in the Name area. Check the box in front of Java ME SDK Tools and ME SDK Demos as shown in Figure 2-4. Click Next.

  7. Figure 2-4 Selecting Oracle Java ME SDK Plugins

    Description of Figure 2-4 follows
    Description of "Figure 2-4 Selecting Oracle Java ME SDK Plugins"

  8. The installation details are displayed. Press Next. The items you checked are listed, as shown in Figure 2-5. Press Next again.

    Figure 2-5 Eclipse Plugins Installation Details

    Description of Figure 2-5 follows
    Description of "Figure 2-5 Eclipse Plugins Installation Details"

  9. Accept the terms of the license agreement and click Finish.

  10. Check the Java ME SDK Tools Category and its subcategories and press the Next button to start the Add wizard.

  11. Accept the terms of the license agreement and click Finish. The installation process starts.

  12. When the installation process completes, restart Eclipse. The Eclipse Welcome Screen is displayed, as shown in Figure 2-6.

    Figure 2-6 The Eclipse Welcome Screen

    Description of Figure 2-6 follows
    Description of "Figure 2-6 The Eclipse Welcome Screen"

2.1.2 Installing Plugins on Eclipse Juno 4.2

On Eclipse Juno 4.2, installing the Oracle Java ME SDK plugins requires the Eclipse Mobile Tools for Java (MTJ) toolkit. The MTJ is not bundled with Juno and must be installed manually, before installing the Eclipse plugins.

To install the Eclipse Mobile Tools for Java toolkit:

  1. Go to Help > Install New Software.

  2. In the “Work with” field, enter this URL: http://download.eclipse.org/releases/indigo

  3. Click Add.

  4. When the plugins are discovered, open the Mobile and Device Development Tools hierarchy and check Mobile Tools for Java Examples and Mobile Tools for Java SDK.

  5. Uncheck the "Contact all update sites...." checkbox and click Next.

  6. On the installation screen select all plugins and click Finish. Then click OK.

A Juno plugin named org.eclipse.jetty.server_<version>.jar conflicts with the MTJ libraries when the plugin version is higher than 6.

If the org.eclipse.jetty.server version is higher than 6 you must prevent it from loading by changing its name so the JAR file is not parsed. Locate the file in the \plugins directory of your Juno installation and change the extension from .jar to something else.

For example, change it to: org.eclipse.jetty.server_<version>.old.


Note:

Once you have installed the MTJ toolkit for Eclipse Juno 4.2, the procedure for installing the Oracle Java ME SDK plugins is the same as for Eclipse Indigo 3.7. See "Installing Plugins on Eclipse Indigo 3.7".


2.2 Configuring Eclipse

To configure Eclipse, follow these steps:

  1. Select Window > Open Perspective > Other and choose Java ME, as shown in Figure 2-7. Click OK.

    Figure 2-7 Selecting Java ME for Configuration

    Description of Figure 2-7 follows
    Description of "Figure 2-7 Selecting Java ME for Configuration"

  2. Select Window > Preferences > and expand the Java ME node.

  3. Select Device Management. The Device Management page displays a list of devices used by Oracle Java ME SDK projects, as shown in Figure 2-8.

    Figure 2-8 The Device Management Screen

    Description of Figure 2-8 follows
    Description of "Figure 2-8 The Device Management Screen"

  4. Click the Manual Install... button, to the right of the Device Management screen.

  5. In the Specify Search Directory field, enter or browse to the location of the Oracle Java ME SDK platform installation. For example:

    C:\Java_ME_platform_SDK_3.3

  6. Click OK. When the five default emulators are detected, make sure all the devices are checked, as shown in Figure 2-9, and click Finish.

    Figure 2-9 Manual Device Installation

    Description of Figure 2-9 follows
    Description of "Figure 2-9 Manual Device Installation"

  7. Click OK to close the installation window.

    This returns you to the Eclipse main window. The Oracle Java ME SDK is now ready to use.

2.3 Verify Your Installation

The outstanding feature of Oracle Java ME SDK is device emulation for the Connected LimitedDevice Configuration (CLDC). If the plugins are properly installed you see the Device Selector tab on the bottom left. If they are not visible, you can select Window > Show View > Device Selector.

The Oracle Java ME SDK has two components.

2.3.1 Adding Devices Manually

If the Oracle Java ME SDK plugins are installed and you cannot see the Device Selector, you can add the Java ME SDK devices manually.

  1. Select Window > Open Perspective > Other > Java ME and click OK.

  2. Go to Window > Preferences > Java ME > Device Management and click on Manual Install.

  3. In the Specify Search Directory field, insert the path to the Java ME SDK platform installation directory, and press Enter. The devices appear on the Devices table. Click on Finish and then click on OK. The Device Selector opens.

2.4 Quick Start

The following tips offer some hints for getting started as quickly as possible.