1 Installing Mobile Application Framework with JDeveloper

This chapter describes how to install JDeveloper and the Mobile Application Framework (MAF) extension for application development.

This chapter includes the following sections:

1.1 Introduction to Installing the MAF Extension with JDeveloper

The first step in starting with MAF application development is to install Oracle JDeveloper and the MAF extension.

In the current release, you must install JDeveloper using JDK 1.7, and then install the MAF extension in JDeveloper specifying JDK 1.8 in the dialog that appears after JDeveloper restarts after installation of the extension. This allows MAF applications to compile with JDK 1.8.

Following installation of the MAF extension in JDeveloper, configure additional development tools for the platforms where you intend to deploy your MAF application. For more information, see Chapter 2, "Setting Up the Development Environment."

Before you can create a MAF application using the MAF extension in JDeveloper, ensure that you have any third-party software required to develop applications for the platform on which you intend to deploy your MAF application.

Note:

You can deploy the same MAF application to all supported platforms without changing your application's code. You need the third-party software to test, debug, and deploy the MAF application on the target platform.

1.2 Installation Requirements for MAF Applications to be Deployed to the iOS Platform

Before you start creating a MAF application that you are planning to deploy to the iOS platform, ensure that you have the following available:

Before you start deploying your application to a development environment (see the "Getting Started with Mobile Application Development" chapter in Developing Mobile Applications with Oracle Mobile Application Framework), decide whether you would like to use a mobile device or its simulator: if you are to use a simulator, see Section 2.4.3, "How to Set Up an iPhone or iPad Simulator"; if your goal is to deploy to a mobile device, ensure that, in addition to the components included in the preceding list, you have the following available:

1.3 Installation Requirements for MAF Applications to be Deployed to the Android Platform

Before you start creating a MAF application that you are planning to deploy to the Android, ensure that you have the following available:

Before you start deploying your application to a development environment (see the "Getting Started with Mobile Application Development" chapter in Developing Mobile Applications with Oracle Mobile Application Framework), decide whether you would like to use a mobile device or its emulator: if you are to use an emulator, see Section 2.4, "Setting Up Development Tools for the iOS Platform"; if your goal is to deploy to a mobile device, ensure that, in addition to the components included in the preceding list, you have the following available:

1.4 Setting Up JDeveloper

Oracle JDeveloper and its MAF extension are essential tools used in developing MAF applications.

Before you begin:

To install JDeveloper on a computer running the Windows platform:

  1. In your file system, navigate to the directory that contains the JDeveloper executable file, then right-click that folder and select CMD Prompt Here As Administrator.

  2. Run the following command to explicitly install JDeveloper using the required JDK 1.7:

    <fully_qualified_path_to_JDK7>\bin\java -jar <JDEV_12.1.3_jar>

For more information, see Oracle Fusion Middleware Installation Guide for Oracle JDeveloper.

To install JDeveloper on a computer running the Mac OS X platform:

  1. Open a Terminal window.

  2. Set the JAVA_HOME to Java 1.7 by running the following command:

    export JAVA_HOME=$(/usr/libexec/java_home -v1.7)

  3. Verify that Java 1.7 is used by running the following command:

    java -version

  4. Using the same Terminal window, install JDeveloper by executing the following:

    java -jar <JDEV_12.1.3_jar>

For more information, see the section about using Oracle JDeveloper on the Mac OS X platform in Oracle Fusion Middleware Installation Guide for Oracle JDeveloper.

To verify the installation of JDeveloper:

  1. Check the <JDEV_HOME>\jdev\bin\jdev.conf file and confirm that the SetJavaHome property points to JDK 1.7.

  2. Start JDeveloper and select the Studio Developer (All Features) role when prompted.

  3. From the main menu, select Help > About > Version and ensure that the Java platform 1.7 is used, as Figure 1-1 shows.

    Figure 1-1 Verifying JDK Version

    This image is described in the surrounding text

1.5 Installing the MAF Extension in JDeveloper

You download the MAF extension using the Check for Updates menu in JDeveloper.

Once you have installed the MAF extension, you need to configure additional development tools for the platforms where you intend to deploy your MAF application. For more information, see Chapter 2, "Setting Up the Development Environment."

To download and install the MAF extension:

  1. In JDeveloper, choose Help > Check for Updates.

    Note:

    You might need to configure proxy settings on your development computer: on Windows, select Tools > Preferences from the main menu, and then Web Browser and Proxy from the tree on the left of the Preferences dialog; on Mac OS X, this option is accessed from JDeveloper > Preferences.
  2. In the Select update source page that Figure 1-2 shows, select Official Oracle Extensions and Updates under the Search Update Centers, and then click Next.

    Figure 1-2 Checking for Updates in JDeveloper

    This image is described in the surrounding text

    Alternatively, if network access is not available, you can select the Install From Local File option. In this case, you need to point to the MAF extension file that you already downloaded to a directory on your development computer.

  3. In the Select updates to install dialog, select the Mobile Application Framework update.

  4. In the License Agreements page, shown in Figure 1-3, review The Oracle Technology Network License Terms for Oracle Mobile.

    Note:

    You must comply with all of the license terms and conditions with respect to the Oracle Mobile Application Framework Program available at http://www.oracle.com/technetwork/indexes/downloads/index.html.
  5. Click I Agree.

    Figure 1-3 Licensing Agreements for Mobile Application Framework Program

    This image is described in the surrounding text
  6. Click Next, and then click Finish.

  7. Restart JDeveloper.

  8. Use the Create JDK 8 Profile dialog that Figure 1-4 shows to specify the path to the directory on your computer that contains JDK 1.8.

    Figure 1-4 Creating JDK 8 Profile

    This image is described in the surrounding text

    Note:

    If you specify an invalid directory or directory that does not contain JDK 1.8, an error dialog is displayed.

    You do not have to complete the Create JDK 8 Profile dialog the next time you use JDeveloper, unless you reinstall the MAF extension and choose not to preserve JDeveloper's system preferences.

  9. Check whether or not MAF has been successfully added to JDeveloper:

    • Select File > New > From Gallery from the main menu to open the New Gallery dialog.

    • In the Categories tree on the left, expand the Client Tier node and make sure it contains Mobile Application Framework (see Figure 1-5).

    Figure 1-5 Verifying MAF Installation

    This image is described in the surrounding text

    In addition, verify that you installed the correct version of MAF. To do so, select Help > About from the main menu, then select the Extensions tab on the About Oracle JDeveloper dialog, and then examine the extension list entries by searching for Mobile Application Framework, as Figure 1-6 shows.

    Figure 1-6 Verifying MAF Version

    This image is described in the surrounding text

In addition to the preceding steps, your development environment must be configured for target platforms and form factors. For more information, see Chapter 2, "Setting Up the Development Environment."