corner imagecorner image
FeaturesPluginsDocs & SupportCommunityPartners

Migrating Java Studio Creator Projects to NetBeans IDE

Great news for Java Studio Creator users! We've put the great visual web development capabilities you're used to into the open-source NetBeans IDE, along with the ability to build desktop, mobile, and enterprise applications. NetBeans IDE 6.0 and 6.1 also provide tools for C/C++, Ruby, Ruby on Rails, and SOA application development, so you can expand your skills or even unify your entire development environment.

Contents

Content on this page applies to NetBeans IDE 6.0 and 6.1

Before you use this tutorial, you must have installed NetBeans IDE 6.0 or 6.1 with Web functionality (Web & Java EE or Full install) on your system, available at the NetBeans IDE 6 Download page. Familiarize yourself with the basic parts of the IDE. (Note, for example that some of the windows are in different locations in NetBeans than they were in Java Studio Creator.) All steps in this tutorial are based on a Java Studio Creator project, which uses JSF 1.1 and J2EE 1.4.

Why Migrate

Why migrate to NetBeans IDE? Here are a few reasons:

  • NetBeans IDE is the supported migration path for Java Studio Creator.
  • NetBeans IDE supports all types of web, desktop, and mobility application development - no need to switch tools.
  • NetBeans IDE supports the latest Java SE and EE technologies.
  • NetBeans IDE supports a wide selection of application servers out of the box.

This guide will walk you through the process of importing a Sun Java Studio Creator project into NetBeans IDE. Tips and techniques are provided for migrating the most common types of projects supported by Sun Java Studio Creator. Of course, projects can differ widely with respect to the services and technologies used, however many of the migration guidelines should still apply.

Getting started with the NetBeans IDE

The visual web development capabilities from Java Studio Creator have been fully incorporated into the NetBeans Web & Java EE distribution. To begin migrating your projects from Java Studio Creator, set up your NetBeans IDE 6.0 or 6.1 as follows:

  1. Download and install the NetBeans 6.0 or 6.1 Web & Java EE distribution. You may also choose the Full NetBeans distribution that contains Web & Java EE as a subset.
  2. Follow the instructions below for migrating the user directory from Java Studio Creator to the NetBeans IDE.
  3. From within the IDE, install two additional plugins as follows:
    1. In the main toolbar, click Tools > Plugins.

      This opens the Plugins Manager.
    2. In the available Plugins tab, select the checkbox next to the following plugins:
      • Visual Web JSF Backwards Compatibility Kit - This Provides supplemental libraries that are required to support projects based on J2SE 1.4 or J2EE 1.4. These include:
        • JavaServer Faces 1.1 Reference Implementation (RI).
        • JDBC RowSet Reference Implementation (RI).
        • JAX-RPC libraries from JWSDP 1.6.
      • Visual Web JSF Portlet Support - This is needed only if you are migrating portlet projects from Sun Java Studio Creator.
    3. Click install and follow the prompts in the Plugin Manager wizard.

Before You Start Migrating Projects

You should take the following items into account when migrating projects from Sun Java Studio Creator 2 Update 1:

  • Be sure to make a backup copy of your project before opening it in NetBeans IDE. Once a project is opened in NetBeans 6.0 or 6.1, the project will no longer be compatible with Sun Java Studio Creator.
  • Projects created in Sun Java Studio Creator include a folder containing state information that may generate errors when imported into NetBeans IDE 6.0 or 6.1. Before opening the project in NetBeans IDE it is recommended that the following folder be removed from the project: myProject/nbproject/private. When the project is opened in NetBeans IDE, this folder will be regenerated with up to date state information.
  • If you are using an older release of Sun Java Studio Creator, please migrate your project to Sun Java Studio Creator 2 update 1 as described in Migrating Your Java Studio Creator 2 Settings and Data to the New Version of the IDE, Update 1.

Migrating the User Directory

Be sure to close all instances of the NetBeans and Java Studio Creator IDEs before starting NetBeans IDE. When you open NetBeans IDE 6.0 or 6.1 for the first time, the IDE will recognise a previous installation of Java Studio Creator 2 Update 1 and you will be prompted to migrate your user directory as shown in the figure below. Click Yes in the Confirm Import Settings dialog to migrate the settings. Confirm Import Settings Dialog

If you want to open a project that you developed in another version of the IDE, and you did not migrate the user settings for that version, perform these steps:

  1. Close the NetBeans IDE.
  2. Rename the user directory name of the IDE version that you do not want to migrate.
  3. Delete the NetBeans IDE 6.0 or 6.1 user directory. For the location of the user directory, choose Help > About and select the Details tab as shown in the figure below.
  4. Restart the NetBeans IDE.
  5. In the Confirm Import Settings Dialog, click Yes to migrate the settings for the version that was used to create the project.

    Each time you run the IDE, the user directory is created. The file that you deleted in Step 3 is regenerated.

    To be prompted at your next launch of NetBeans IDE, rename the user directory. For the location of the user directory, choose Help > About as shown in the figure below.Installation Details
  6. Click Open Project Folder to open the project in the IDE. The IDE scans the project classpath. This might take a few seconds, depending on the size of the project.

Connecting to a Data Source

<>

In the NetBeans IDE, you must resolve all data sources before you can run the application.

When you migrate the Java Studio Creator 2 Update 1 user settings directory, third party complibs migrate to the NetBeans IDE directory and also appear in the Tools > Component Library Manager in NetBeans IDE 6.0 or 6.1.

The VIR database is bundled with the IDE. To migrate settings, simply open the project, then expand the main project node. (This is the typical way to migrate database settings.) A progress bar will appear in the bottom right of the IDE, displating 'Updating Legacy Project...' This will migrate your database connections and datasources if settings were not migrated from a previous user directory when the IDE was run for the first time. The project will be updated to be ready to use in NetBeans 6.0 or 6.1.

Note: The Travel connection from Java Studio Creator 2 Update 1 is not migrated; sample applications from the older IDE might not work in NetBeans IDE 6.0 or 6.1. After restarting NetBeans IDE there will be a Travel connection that connects to a Travel database that has a schema incompatible with the one from Java Studio Creator 2 Update 1.

Note: Creator projects that use Oracle database connections might not be properly migrated. This is because Creator used DataDirect drivers for Oracle which are no longer bundled with NetBeans 6. These drivers can only be used from within Creator and thus cannot be migrated. There is however a workaround for this issue here.

Using Page Navigation

The Page Navigation Editor used in Java Studio Creatoris now the Page Flow Editor in NetBeans IDE 6.0 and 6.1.

In Java Studio Creator, projects had three faces configuration files each for separate purposes:

  • managed-beans.xml. For all managed beans entries (including session, request and application beans).
  • navigation.xml. Contained all the navigation rules.
  • faces-config.xml. This was usually empty unless any entries were made manually.

In contrast for new projects in NetBeans 6.0 and 6.1, everything goes into one single faces-config.xml file by default but you have the capability to add new faces configuration files and add your own rules or entries in them.

The new Page Flow editor can be used with any faces configuration file.

The new Page flow editor provides 3 different views in which you can view your navigation rules (you can switch views by using the drop down list next to the XML button):

  • Project. This is the default view and shows all pages in the project (including JSF pages, html etc) along with all navigation rules of that particular faces config file.
  • Faces Configuration Only. Similarly in this view all rules in the current faces config file are shown but only relevant pages are displayed.
  • All Faces Configuration. In this view navigation rules and cases from all faces configuration files are merged together and shown along with all relevant pages.

For more information about using page navigation, see the NetBeans tutorial Navigating Pages in a Web Application. This tutorial covers the page navigation features of the NetBeans integrated development environment.

Resolving Library References

If you receive an error message stating that you have unresolved library references, you need to remove the references. Your project is not at risk when you remove the library references.

  1. Right-click the project node and choose Properties.
  2. Click the Libraries node and remove entries in the Compile window that have a yellow-badged icon next to the invalid library reference.
  3. Expand the Build > Packaging node and remove any invalid library references.

Deploying Migrated Applications

NetBeans IDE 6.0 and 6.1 'Web and JavaEE' and Full installers include the Sun Java System Application Server/Glassfish v2 and Apache Tomcat 6.0.14. If your migrated project was originally deployed on the Sun Java System Application Server, then you can deploy the project in NetBeans IDE 6.0 or 6.1.

If you originally deployed your migrated application to a server other than Sun Java System Application Server, then you need to make modifications to deploy your application.

To deploy your project to a different version of Tomcat, you must install Tomcat, which you can download from tomcat.apache.org. Tomcat versions 5 and 6 are tested with NetBeans IDE 6.0 and 6.1. For more information about deploying to Tomcat, see the FAQs Add External Tomcat and Deployment of External Tomcat on NB6.

Getting Assistance With Project Migration

If you have more questions about migrating your projects from Sun Java Studio Creator 2 Update 1 to NetBeans IDE, use the feedback link at the end of this article.

See Also:

Summary

Importing a Sun Java Studio Creator 2 Update 1 project in NetBeans IDE consists of four steps:
  1. Open the project in the NetBeans IDE 6.0 or 6.1.
  2. Resolve missing server problems if necessary.
  3. Resolve all data sources.
  4. Deploy the project.

See Also


This page was last modified: April 15, 2008

Bookmark this page

del.icio.us furl simpy slashdot technorati digg