Importing a Project


The Java ME platform supports automatic imports from existing J2ME Wireless Toolkit projects, Sun Java Studio Mobility projects, and projects consisting of stand-alone MIDP sources. When you import projects, the sources remain in their existing locations.

Unlike with general Java projects, only a single source root is supported for Mobility projects. If the project you are importing has multiple source roots, you have to create one project for each source root and then make dependencies between the projects. This is explained further in Structuring Your Projects in Chapter 3.


To create a new NetBeans project from a Sun Java Studio Mobility project or stand-alone sources:

  1. Choose File | New Project.

  2. In the Categories tree, select the Mobile folder.

  3. Select Import Mobility Studio Project or Mobile Project from Existing MIDP Sources, and click Next.

  4. In the Imported Sources Location field, enter the folder that contains the default package of your sources (the folder might be called src).

  5. In the Imported Jad/Manifest Location field, enter the folder that contains the application's JAD file. You can leave this field blank if your project does not have a Java Application Descriptor (JAD) file.

  6. Click Next.

  7. Optionally, edit the following fields in the Name and Location panel of the wizard:

    Project Name. The name by which the project is referred to in the IDE's user interface.

    Project Location. The location for the new project.

  8. Optionally, deselect the Set As Main Project checkbox if you have another project open that you want associated with the IDE's main project commands (such as Build Main Project).

  9. Click Next.

  10. Configure the project's default emulator platform.

  11. Click Finish.

To create a new NetBeans project from a J2ME Wireless Toolkit project:

  1. Choose File | New Project.

  2. In the Categories tree, select the Mobile folder.

  3. Select Import Wireless Toolkit Project and click Next.

  4. On the Specify WTK Project page of the wizard (shown in Figure 14-1), specify the location of your Wireless Toolkit installation directory that contains the project you would like to install.

    Figure 14-1. New Project wizard, Specify WTK Project page

  5. A list of all projects contained in the installation directory is displayed. Select the project you would like to import.

  6. Click Next.

  7. Fill in the Name and Location page and the Platform Selection page of the wizard as described in steps 7 through 11 in the previous procedure.

Two projects that use the same source root should not be open concurrently within the IDE. Although the IDE takes steps to prevent this situation, the projects will become unstable should it occur.




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net