C H A P T E R  3

Installing the Mobile Edition IDE

This chapter contains information on how to install Forte for Java 4, Mobile Edition on each of the supported platforms. The subdirectories installed with the IDE are described and uninstallation instructions are also provided.

If you want to use the Palm OS Emulator (included with the J2ME Wireless Toolkit) with the Mobile Edition IDE, you should install the emulator before installing the IDE. See Configuring the Palm OS Emulator for more information.


Supporting Previous Forte for Java Software Releases

Although there has not been a previous release of the Mobile Edition IDE, you might be using the Early Access version of the Mobile Edition IDE, or you might be using the J2MEtrademark Wireless Toolkit with a previous version of Forte for Java, Community Edition or Forte for Java, Enterprise Edition.

To upgrade your previous version of the Forte for Java IDE to Forte for Java 4, Mobile Edition, you must do one of the following:

If you want to use the same installation directory as the previous IDE version, you must first uninstall the previous version of the IDE prior to installing Mobile Edition IDE software.


Note - Because the Community and Enterprise Edition IDEs include several modules not supported by Mobile Edition IDE, Sun does not recommend using previous settings from the Community and Enterprise Edition IDEs with the Mobile Edition IDE.




Creating a Shared Installation

If you want to share a Forte for Java installation between multiple users, you must install the Mobile Edition IDE into a shared directory.

After installation of the IDE in the supported Solaris environment or Red Hat Linux environment, all user settings are stored in the ffjuser40me directory created under each user's home directory. This occurs for both shared and unshared installations.

After installation of the IDE in a Microsoft Windows system, you must set your own user directory using a dialog box that appears immediately upon initial startup of the IDE from your machine. This occurs for both shared and unshared installations.

The recommended name for the user directory in a Microsoft Windows system is drive:fully-qualified-path\ffjuser40me. This name is entered as the UserDir value of the Software\SunMicrosystems, Inc.\Forte for Java key in the HKEY_CURRENT_USER registry. This value is not deleted when the IDE is uninstalled. If the UserDir value is not explicitly deleted from the Microsoft Windows Registry, it will be reused by future installations of this version of the IDE. Refer to some troubleshooting information in Chapter 6, if you want to use a different location for your user directory.


Installing the Mobile Edition IDE on the Supported Platforms

These instructions describe the installation process for each of the supported platforms.

Installation on Microsoft Windows Systems

You can install the Mobile Edition IDE on a supported Microsoft Windows system through an .exe file.



Note - You must have the J2SE, v. 1.3.1 platform or J2SE, v. 1.4.0 platform installed on your system before installing the Mobile Edition IDE. The recommended option is the J2SE, v. 1.4.0 platform with the Mobile Edition IDE. Read for instructions on installing the software.



1. If you have not already done so, download the ffj_me_win32_en.exe installer file from http://www.sun.com/software/sundev/jde/buy/index.html or locate the file on the Forte for Java 4 product CD.

2. Double-click the ffj_me_win32_en.exe file in the ffj-download-directory or on the Forte for Java 4 product CD.

The InstallShield's Welcome screen appears.



Note - If you encounter errors at any point during the Mobile Edition IDE installation, refer to Chapter 6 for some troubleshooting hints.



3. In the Welcome screen, click Next.

4. Read the license agreement carefully. To agree, accept the terms of the license agreement, and click Next.

You must agree to the license to continue with the installation.

InstallShield attempts to locate a compatible Java 2 SDK v. 1.3.1 or v. 1.4.0 on your system.

5. Set the location of compatible Java 2 SDK software and click Next.

The Mobile Edition IDE requires local or network access to either v. 1.3.1 or v. 1.4.0 of the Java 2 SDK software. Specify which installed software to use by doing one of the following:

Click Next after you have set the Java 2 SDK location.

6. Accept the default installation folder or click Browse to install the IDE in a different directory. Click Next to continue.



Note - The installation directory name cannot contain any spaces and it must be an empty or new directory.



7. Click Next to confirm the features listed in the Select Features dialog box.

The following features are required for installation:

8. Confirm your installation choices in the installation summary dialog box and click Next.

InstallShield installs the Forte for Java 4 components you have selected.

9. Decide whether you want to associate .java and .nbm files with the Mobile Edition IDE. Click Next to continue.

If you decide to associate these file types, the Mobile Edition IDE will automatically launch when you open these files.

10. Click Finish to complete the installation.

11. Review the Release Notes file for important information regarding the release. You can access the Release Notes from http://forte.sun.com/ffj/documentation/index.html.

12. Continue to Chapter 4 for information on setting up the Mobile Edition IDE.

Installation in the Red Hat Linux Environment

You can install the Mobile Edition IDE in a supported Red Hat Linux environment with a .bin file.



Note - You must have the J2SE, v. 1.3.1 platform or J2SE, v. 1.4.0 platform installed on your system before installing the Mobile Edition IDE. The recommended option is the J2SE, v. 1.4.0 platform with the Mobile Edition IDE. Read for instructions on installing the software.



1. If you have not already done so, download the ffj_me_linux_en.bin installer file from http://www.sun.com/software/sundev/jde/buy/index.html or locate the file on the Forte for Java 4 product CD.

If you are downloading the file from the product download page, save it into the ffj-download-directory.

2. Set the DISPLAY environment variable to display to your local system.

If you are installing to your local system, the DISPLAY environment variable should be set to :0.0.If you are using a superuser (root) account or are doing a remote installation, set your superuser session's DISPLAY environment variable to display to your local system.

For example, to set the variable from a root account running C-shell, type the following in your superuser session command prompt:

# setenv DISPLAY your-local-system:0.0

3. Set the execute permission on the ffj_me_linux_en.bin file and execute it by double-clicking the file from the Forte for Java 4 product CD or by typing the following:

$ cd ffj-download-directory
$ chmod a+x ffj_me_linux_en.bin
$ ffj_me_linux_en.bin



Note - If you encounter errors at any point during the Mobile Edition IDE installation, refer to Chapter 6 for some troubleshooting hints.



4. In the Welcome screen, click Next.

5. Read the license agreement carefully. To proceed, accept the terms of the license agreement, and click Next.

You must agree to the license to continue with the installation.

InstallShield attempts to locate a compatible Java 2 SDK v. 1.3.1 or v. 1.4.0 on your system.

6. Set the location of compatible Java 2 SDK software and click Next.

The Mobile Edition IDE requires local or network access to either v. 1.3.1 software or v. 1.4.0 of the Java 2 SDK software. Specify which installed software to use by doing one of the following:

  • Accept the default location.
  • Select another location from the list of found Java 2 SDK software.
  • Click Browse to specify a different location.

Click Next after you have set the Java 2 SDK location.

7. Accept the default installation directory or click Browse to install the IDE in a different directory. Click Next to continue.



Note - The installation directory name cannot contain any spaces and it must be an empty or new directory.



8. Click Next to confirm the features listed in the Select Features dialog box.

The following features are required for installation:

  • Core Platform and Modules
  • J2ME Wireless Toolkit 1.0.3

9. Confirm your installation choices in the installation summary dialog box and click Next.

InstallShield installs the Forte for Java 4 components you have selected.

10. Click Finish to complete the installation.

11. Review the Release Notes file for important information regarding the release. You can access the Release Notes from the product CD or from http://forte.sun.com/ffj/documentation/index.html.

12. Continue to Chapter 4 for information on setting up the Mobile Edition IDE.

Installation in the Solaris Operating Environments

You can install the Mobile Edition IDE in a supported Solaris operating environment with a .bin file.



Note - You must have the J2SE, v. 1.3.1 platform or J2SE, v. 1.4.0 platform installed on your system before installing the Mobile Edition IDE. The recommended option is the J2SE, v. 1.4.0 platform with the Mobile Edition IDE. Read for instructions on installing the software.



1. If you have not already done so, download the ffj_me_solsparc_en.bin installer file from http://www.sun.com/software/sundev/jde/buy/index.html or locate it on the Forte for Java 4 product CD.

2. Set the DISPLAY environment variable to display to your local system.

If you are installing to your local system, the DISPLAY environment variable should be set to :0.0. If you are using a superuser (root) account or are doing a remote installation, set your superuser session's DISPLAY environment variable to display to your local system.

For example, to set the variable from a root account running C-shell, type the following in your superuser session command prompt:

# setenv DISPLAY your-local-system:0.0

3. Set the execute permission on the ffj_me_solsparc_en.bin file and execute it by double-clicking the file from the Forte for Java 4 product CD or by typing the following:

$ cd ffj-download-directory
$ chmod a+x ffj_me_solsparc_en.bin
$ ffj_me_solsparc_en.bin



Note - If you encounter errors at any point during the Mobile Edition IDE installation, refer to Chapter 6 for some troubleshooting hints.



4. In the InstallShield's Welcome screen, click Next.

5. Read the license agreement carefully. To proceed, accept the terms of the license agreement, and click Next.

You must agree to the license to continue with the installation.

InstallShield attempts to locate a compatible Java 2 SDK v. 1.3.1 or v. 1.4.0 on your system.

6. Set the location of compatible Java 2 SDK software and click Next.

The Forte for Java 4 IDE requires local or network access to either v. 1.3.1 or v. 1.4.0 of the Java 2 SDK software. Specify which installed Java 2 SDK software to use by doing one of the following:

  • Accept the default location.
  • Select another location from the list of found Java 2 SDK software.
  • Click Browse to specify a different location.

Click Next after you have set the Java 2 SDK location.

7. Accept the default installation folder or click Browse to install the IDE in a different directory. Click Next to continue.



Note - The installation directory name cannot contain any spaces and it must be an empty or new directory.



8. Click Next to confirm the features listed in the Select Features dialog box.

The following features are required for installation:

  • Core Platform and Modules
  • J2ME Wireless Toolkit 1.0.3

9. Confirm your installation choices in the installation summary pane and click Next.

InstallShield installs the Forte for Java 4 components you selected.

10. Click Finish to complete the installation.

11. Review the Release Notes file for important information regarding the release. You can access the Release Notes from the product CD or from http://forte.sun.com/ffj/documentation/index.html.

12. Continue to Chapter 4 for information on setting up the Mobile Edition IDE.


Installing the IDE Using the Command-line Options

If you prefer to install the Mobile Edition IDE using the command line, use the following steps to guide you. You need to create a file called installer.sp and add to the file the command-line options you want to use to install the IDE.

1. If you have not already done so, download the installer file for your supported platform from http://www.sun.com/software/sundev/jde/buy/index.html or locate the file on the Forte for Java 4 product CD.

2. Create an installer.sp file in the ffj-download-directory.

The installer does not accept command-line options directly from the command line, so you will need to create the installer.sp file. The IDE installer will read the command-line options you include in this file.

On a Microsoft Windows system, create a file called ffj_me_win32_en.sp and place the file in the ffj-download-directory.

For the Solaris and Linux environments, name the file ffj_me_solsparc_en.sp and ffj_me_linux_en.sp, respectively.

3. Determine the command-line options and corresponding values you want to use, and include them in the installer.sp file.

The following table lists the different command-line options and their default values, if any.You can use either the long or short name for each option.

TABLE 3-1 Forte for Java 4 Command-line Installation Options

Installation Options

Description

fortehome=ffj-install-dir

fh=ffj-install-dir

Specifies the directory into which you want the IDE installed. This is a mandatory command-line parameter for the -silent mode.

jdkhome=jdkhome-dir

jh=jdkhome-dir

Sets the location of the valid Java 2 SDK version to use with the IDE. The installer will configure the IDE to use this Java 2 SDK software. This is a mandatory command-line parameter for the -silent mode.

-silent

Specify this option on the command line and not in the installer.sp file. If not specified, the Installshield wizard will appear. If specified, any error messages will be displayed on the command window from which the installer was invoked.


For example, on a Microsoft Windows system, the ffj_me_win32_en.sp might have the following contents:

fh=C:\forte4j
jh=C:\j2sdk1.4.0

On a Solaris environment, the ffj_me_solsparc_en.sp might have the following contents:

fh=/yourserver/forte4j
jh=/usr/j2se

4. Execute the installer from the command line.

For example, on a Microsoft Windows system, type the following in a command prompt window:

C:\>cd ffj-download-directory
C:\>ffj-download-directory> ffj_me_win32_en.exe -silent

In a Solaris environment, type the following in a terminal window, for example:

$ cd ffj-download-directory
$ ffj_ce_solsparc_en.bin -silent

The installer displays the following on the command prompt or terminal window:

InstallShield Wizard
 
Initializing InstallShield Wizard...
 
Searching for Java(tm) Virtual Machine...
.........
Running InstallShield Wizard...

If there are any errors encountered, messages are displayed on the command prompt window.



Note - If you encounter errors at any point during the Mobile Edition IDE installation, refer to Chapter 6 for some troubleshooting hints.



5. Continue to Chapter 4 for information on setting up the Mobile Edition IDE.


Finding Installation Subdirectories

After you have installed the Mobile Edition IDE, the subdirectories listed in TABLE 3-2 can be found under ffj-install-dir, your Forte for Java 4 installation directory.

TABLE 3-2 Forte for Java Installation Subdirectories

Subdirectory Name

Description

/_uninst

Contains the files used to uninstall the IDE.

/bin

Includes the Forte for Java startup scripts (as well as the ide.cfg file in Microsoft Windows installations).

/docs

Contains miscellaneous documentation.

/emulator

Contains the J2ME Wireless Toolkit emulator.

/lib

Contains the JAR files that make up the IDE's core implementation and the open APIs.

/modules

Stores Forte for Java modules as JAR files.

/sources

Contains sources for libraries that might be redistributed with user applications.

/system

Includes files and directories used by the IDE for special purposes. Go to your individual ffj-user-dir/system directory to get the ide.log, which provides information useful when requesting technical support, and to view project.basic and project.last files, which contain information on Forte for Java projects. In a Microsoft Windows system, this ffj-user-dir/system directory contains the project-specific files under project.basic_hidden and project.last files.

update_tracking.xml

Contains information used by the AutoUpdate Center.



Configuring the Palm OS Emulator

If you want to run the Palm OS Emulator that is included with the J2ME Wireless Toolkit, you should install the emulator before installing the Mobile Edition 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.

a. Run the Palm OS Emulator and right-click the emulator.

A menu appears.

b. Select Settingsright arrow Properties...

The Properties dialog appears.

c. Check the Redirect NetLib calls to host TCP/IP box, and click OK.

The Properties dialog disappears.

d. 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 Mobile Edition IDE, debugging must be disabled altogether.

a. Run the Palm OS Emulator, and right-click the emulator.

A menu appears.

b. Select Settings right arrow Debugging...

The Debug Options dialog appears.

c. Uncheck all the boxes and click OK.

The Debug Options dialog disappears.

d. Right-click the emulator and select Save.

Your changes are saved.

3. Set the Palm OS Emulator location in the Mobile Edition IDE.

The first time you run an application using the Palm OS Emulator through the Mobile Edition 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.


Uninstalling the Mobile Edition IDE

An uninstaller wizard is available to assist you in the uninstallation of the Mobile Edition IDE. Follow these steps to uninstall your copy of the Mobile Edition IDE:

1. Start the uninstaller from the ffj-install-dir/_uninst directory.

  • In a supported Solaris operating environment or Red Hat Linux environment, ensure that your DISPLAY environment variable is defined correctly, and then type:
  • $ java -jar uninstall.jar
    

  • On a Microsoft Windows system, execute the uninstaller.exe file located in the ffj-install-dir/_uninst directory or use the Add/Remove Program utility in the Control Panel.

The uninstaller's Welcome screen appears.

2. Click Next from the Welcome screen.

A list of Forte for Java components is displayed.

3. Select the components you want to uninstall and click Next.

4. Click Next to confirm the components to be uninstalled.

The uninstaller wizard proceeds with the uninstallation of the IDE.

5. Click Finish to close the uninstaller wizard.