| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| |
| <html> |
| <!-- |
| Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. |
| --> |
| <HEAD> |
| <TITLE>NetBeans IDE Guide for JBuilder Users</TITLE> |
| <META NAME="description" CONTENT="NetBeans IDE for JBuilder users"> |
| <link rel="stylesheet" type="text/css" href="../../netbeans.css"> |
| </HEAD> |
| <body> |
| |
| <h1>NetBeans IDE Guide for JBuilder Users</h1> |
| <div class="feedback-box"><a href="https://netbeans.org/about/contact_form.html?to=3&subject=Feedback:%20NetBeans%20IDE%20Guide%20For%20JBuilder%20Users">Feedback</a></div> |
| <p>If you have used JBuilder to develop Java applications in the past but are |
| looking to move to NetBeans IDE, you can easily get started. Here is a general guide to |
| the things you need to do to start NetBeans IDE, import your JBuilder projects |
| into NetBeans IDE, and continue work on your projects.</p> |
| |
| <ul> |
| <li><a href="#download">Downloading NetBeans IDE</a>.</li> |
| <li><a href="#project-system">A Note on the NetBeans IDE Project System</a> |
| <li><a href="#import-general">Importing and Running General Java Projects</a></li> |
| <li><a href="#import-web">Importing and Running Web Projects and Enterprise Projects</a></li> |
| <li><a href="#reopening">Reopening Projects in NetBeans IDE</a> |
| <li><a href="#faq">Frequently Asked Questions</a></li> |
| <li><a href="#nextsteps">Next Steps</a></li> |
| </ul> |
| |
| |
| <h2><a name="download">Downloading NetBeans IDE</a></h2> |
| |
| <p><a href="https://netbeans.org/downloads/index.html">Download NetBeans IDE</a></p> |
| |
| <p>Once you have downloaded NetBeans IDE, you can start work on importing existing projects from the JBuilder |
| environment into NetBeans IDE.</p> |
| |
| <h2><a name="project-system">A Note on the NetBeans IDE Project System</a></h2> |
| <p>All NetBeans IDE projects are all based around the Ant build tool, which makes |
| NetBeans projects easily portable to other environments. However, you do not |
| necessarily need to know anything about Ant to use NetBeans IDE. When you |
| create standard IDE projects, you can |
| handle all project configuration through the IDE's user interface. The IDE |
| maintains the Ant script for you.</p> |
| <p>Conceptually, there are two types of projects:</p> |
| <ul> |
| <li><b>Standard projects.</b> When you create a standard |
| IDE project, the IDE also creates a build script that controls how the project is |
| compiled, run, debugged, and so on. This build script is used when you run standard |
| commands from the IDE (like Build Project) and can also be run from outside of the IDE. |
| Standard projects are those created with any IDE project template <em>except the "With Existing Ant |
| Script" templates</em>.</li> |
| <li><b>Free-form projects.</b> When you create a free-form project |
| (a project created with one of the "With Existing Ant Script" templates), |
| you specify an already existing |
| build script to be used for standard IDE commands. The New Project wizard guides you |
| through mapping IDE commands to the appropriate build targets. For some IDE features, |
| such as debugging, you also need to create special Ant targets to get the feature to work. |
| </li> |
| </ul> |
| <p> |
| |
| <h2><a name="import-general">Importing and Running General Java Projects</a></h2> |
| |
| <p>To import a general Java application into NetBeans IDE, follow these general steps:</p> |
| <ul> |
| <li><a href="#jbuilder-importer">Download the JBuilder Project Importer module</a>.</li> |
| <li><a href="#import-general-project">Import the JBuilder Java SE project into NetBeans IDE</a>.</li> |
| <li><a href="#build-general">Build and run your application</a>.</li> |
| </ul> |
| <div class="indent"> |
| <h3 class="tutorial"><a name="jbuilder-importer">Downloading the JBuilder Project Importer Module</a></h3> |
| <p>You can download the JBuilder Project Importer Module to import projects that you have developed with JBuilder 2005 |
| into NetBeans IDE. (For NetBeans IDE 5.5, this module can also import |
| projects developed with JBuilder 2006). This module eliminates or greatly reduces the amount of work |
| you have to do get your projects working in NetBeans IDE as they worked in JBuilder. |
| </p> |
| |
| <p>To download the JBuilder Project Importer module:</p> |
| <ol> |
| <li>Start NetBeans IDE.</li> |
| <li>In NetBeans IDE, choose Tools | Update Center.</li> |
| <li>In the Update Center wizard, select the JBuilder Project Importer module and complete the wizard.</li> |
| </ol> |
| <h3 class="tutorial"><a name="import-general-project">Importing the JBuilder Java SE Project Into NetBeans IDE</a></h3> |
| <p>Once you have the importer module added, you can import Java SE projects |
| from JBuilder with a simple wizard.</p> |
| <p>To import a general Java project into NetBeans IDE:</p> |
| <ol> |
| <li>In NetBeans IDE, choose File | Import Project | JBuilder Java Project.</li> |
| <li>In the wizard, specify the JBuilder project file (Project to Import field) and the folder |
| where you want the NetBeans IDE project metadata to be created (Destination Folder field). |
| <p>In the NetBeans IDE 5.5 version of the project importer, you also are |
| presented with JBuilder User Home and JBuilder Installation Folder. Filling |
| in these fields (where appropriate) makes it easier for the IDE to handle |
| any dependencies that the project has on other projects or libraries.</p> |
| <p>The IDE leaves |
| the project sources where they are so that you can still work with them in JBuilder.</p> |
| </ol> |
| |
| |
| |
| <h3 class="tutorial"><a name="build-general">Building and Running Your Application</a></h3> |
| <p>To build your application, right-click the project's node in |
| in the Projects window and choose Build Project.</p> |
| <p>To run your application in the IDE, right-click the project's node in |
| in the Projects window and choose Run Project.</p> |
| |
| <p><b>Note:</b>When you build and run applications in NetBeans IDE, the |
| output also includes output from the Ant script that the project is based on. |
| If you are not specifically concerned with the working of the Ant script, |
| you can ignore that part of the output. |
| </p> |
| |
| <p>For more information on importing projects into NetBeans IDE 5.0, see |
| <a href="https://netbeans.org/kb/archive/index.html">https://netbeans.org/kb/archive/index.html</a> |
| </div> |
| <h2><a name="import-web">Importing Web Projects and Enterprise Projects</a></h2> |
| |
| <p>NetBeans IDE does not have a special feature to convert JBuilder web and |
| enterprise projects into projects in NetBeans IDE. However, importing existing projects |
| into NetBeans IDE is fairly straightforward.</p> |
| <p>To import a web or enterprise application project, follow these general steps:</p> |
| <ul> |
| <li><a href="#register-server">Register the appropriate server with NetBeans IDE</a>.</li> |
| <li><a href="#web-project-setup">Set up a project for the application in NetBeans IDE</a>.</li> |
| <li><a href="#web-project-configure">Configure the project in NetBeans IDE</a>.</li> |
| <li><a href="#web-project-build">Build and run the project in NetBeans IDE</a>.</li> |
| </ul> |
| |
| <div class="indent"> |
| <h3 class="tutorial"><a name="register-server">Registering the Server with the IDE</a></h3> |
| <p>Before setting up a project in the IDE, make sure that the server that you want to |
| develop for is registered in the IDE. Otherwise you will not be able to |
| complete project setup.</p> |
| |
| <p>The bundled Tomcat Web Server is registered with the IDE automatically. |
| If you installed the NetBeans IDE 5.0/Sun Java System Application |
| Server bundle, a local instance of the application server is registered automatically. |
| If you want to deploy to an instance of an unbundled application server, such as |
| the Sun Java System Application Server, JBoss, or WebLogic, you have to register a local instance |
| with the IDE. |
| <p>To register an application server instance with the IDE:</p> |
| |
| <ol> |
| <li>Choose Tools > Server Manager from the main window.</li> |
| <li>Click Add Server. Select the server type and give |
| a name to the instance. Then click Next.</li> |
| <li>Specify the server information, the location of the local instance of |
| the application server, and the domain to which you want to deploy.</li> |
| </ol> |
| |
| <h3 class="tutorial"><a name="web-project-setup">Setting up a NetBeans IDE Project for a Web or Enterprise Application</a></h3> |
| <p>You can use either of the following techniques for setting up your project in NetBeans IDE:</p> |
| <ul> |
| <li>Create a new NetBeans IDE standard project using the sources from the JBuilder project.</li> |
| <li>Use the Export to Ant wizard in JBuilder and then create a NetBeans IDE free-form project |
| using that build script.</li> |
| </ul> |
| |
| <p>When converting JBuilder projects to NetBeans IDE, the way you convert |
| the projects depends largely on these questions:</p> |
| |
| <ul> |
| <li>How complex is the project in terms of dependencies, |
| server configuration, database access, and so on?</li> |
| <li>What technologies does the project use?</li> |
| <li>To what extent does the project need to be maintained? Is it |
| likely that the project will need major reworking or extenstion?</li> |
| <li>To what extent do you use the IDE for building tasks and to what |
| extent do you rely on command-line tools or other tools?</li> |
| </ul> |
| <p>If you have a project that you have just started developing or which |
| has not yet become too complex, you will |
| probably want to convert the project into a standard NetBeans IDE project |
| using a "With Existing Sources" template. |
| Doing so gives you full integration with |
| all of NetBeans IDE's features.</p> |
| |
| <p>If you have a project that is very complex and/or which you do not |
| anticipate extensively modifying, you might find |
| that it is most practical to use a NetBeans IDE free-form project (using a |
| "With Existing Ant Script" template). Creating a free-form project enables you to easily build and modify the |
| project based on an Ant script exported from JBuilder. The IDE uses the |
| Ant script you designate to handle standard project commands, |
| such as building and running the project. |
| <p>The advantage of |
| this approach is that you do not have to reconfigure |
| your project from scratch. However, if you want full IDE integration |
| using this approach, you might need to some manual configuration to make |
| some features work (such as debugging, code completion, and some other editing feataures). |
| See <a href="https://netbeans.org/kb/articles/freeform-config.html">Advanced Free-Form Project Configuration Guide</a></p> |
| |
| <h4>Importing a project as a standard NetBeans project</h4> |
| <p>To import a web or enterprise project into NetBeans IDE as a standard project:</p> |
| <ol> |
| <li>In NetBeans IDE, choose File | New Project.</li> |
| <li>Select the appropriate category (Web or Enterprise).</li> |
| <li>Select the appropriate template and click next. The |
| possible templates are Web Application With Existing Sources, |
| EJB Module With Existing Sources, and Enterprise |
| Application With Existing Sources. |
| </li> |
| <li>Complete the wizard.</li> |
| </ol> |
| |
| <h4>Importing a project as a free-form NetBeans project</h4> |
| <p>To import a web or enterprise project into NetBeans IDE as a free-form project:</p> |
| <ol> |
| <li>In JBuilder, select the project's node in the Project window.</li> |
| <li>Choose File | New.</li> |
| <li>In the Object Gallery, click Build. Then select Export to Ant and click OK.</li> |
| <li>Complete the Export to Ant wizard. |
| <li>In NetBeans IDE, choose File | New Project.</li> |
| <li>Select the appropriate category (Web or Enterprise).</li> |
| <li>Select the appropriate template and click next. The |
| possible templates are Web Application With Existing Ant Script and |
| EJB Module With Existing Ant Script. There is no free-form |
| project template for Enterprise Application (EAR) projects. |
| </li> |
| <li>On the Name and Location page of the wizard, specify the location of the |
| build script that you have just exported and complete the other fields on the page.</li> |
| <li>Complete the rest of the wizard.</li> |
| </ol> |
| |
| <h3 class="tutorial"><a name="web-project-configure">Configuring the Project in NetBeans IDE</a></h3> |
| <p>After creating the NetBeans IDE project, you might need to use the Project Properties |
| dialog box to configure the way the project is built and run.</p> |
| <p>You can access |
| the Project Properties dialog box by right-clicking the project's main |
| node in the Project window and choosing Properties.</p> |
| |
| <h3 class="tutorial"><a name="web-project-build">Building and Running Your Application</a></h3> |
| <p>To build your application, right-click the project's node in |
| in the Projects window and choose Build Project.</p> |
| <p>To run your application in the IDE, right-click the project's node in |
| in the Projects window and choose Run Project.</p> |
| |
| <p><b>Note:</b> When you build and run applications in NetBeans IDE, the |
| output also includes output from the Ant script that the project is based on. |
| If you are not specifically concerned with the working of the Ant script, |
| you can ignore that part of the output. |
| </p> |
| |
| |
| <p>For more general information on importing web projects into NetBeans IDE 5.0, see |
| <a href="https://netbeans.org/kb/archive/index.html">https://netbeans.org/kb/archive/index.html</a> |
| <p>For more general information on importing enterprise projects into NetBeans IDE 5.0, see |
| <a href="https://netbeans.org/kb/archive/index.html">https://netbeans.org/kb/archive/index.html</a> |
| </div> |
| <h2><a name="reopening">Reopening Projects in NetBeans IDE</a></h2> |
| <p>Projects in the IDE are represented by a folder rather than a file. |
| If you close a project, you can open it again by choosing the File | Open Project command |
| and navigating to the folder containing the project's build script. Project folders are |
| marked with the <img src="../../images_www/articles/projectFolder.gif"> icon. <!--TODO fill in image--></p> |
| |
| <h2><a name="faq">Frequently Asked Questions</a></h2> |
| <p><b>Where is the NetBeans IDE project file?</b><br> |
| NetBeans IDE does not have a single project file. Instead there is a |
| project folder (called <em>nbproject</em>) that contains various pieces of project metadata.</p> |
| <p><b>Can I visually edit my JBuilder Swing forms in NetBeans IDE?</b><br> |
| Unfortunately, no. However, you might find it worthwhile to |
| use the Matisse GUI Builder within NetBeans IDE to recreate |
| syour legacy forms. Matisse provides makes use of the |
| new GroupLayout layout manager and slick WYSIWIG features to take GUI design to |
| a whole new level of simplicity.</p> |
| <!--TODO tip on changing platforms--> |
| |
| <h2><a name="nextsteps">Next Steps</a></h2> |
| |
| <p>For more detailed information on using NetBeans IDE 5.0, you can investigate |
| the following links:</p> |
| <p><a href="https://netbeans.org/kb/archive/index.html">Using NetBeans IDE 5.0</a>. A |
| medium-sized guide to NetBeans IDE's features.</p> |
| <p><a href="https://netbeans.org/kb/archive/index.html">NetBeans 5.0 Tutorials, Guides, and Articles page</a>. |
| Lists the main tutorials and guides for NetBeans IDE 5.0 and provides links to others.</p> |
| |
| |
| <p><a href="http://wiki.netbeans.org/wiki/view/NetBeansUserFAQ">NetBeans IDE FAQs</a>. A comprehensive list |
| frequently asked questions and their answers.</p> |
| <p><a href="https://netbeans.org/community/lists/index.html">nbusers mailing list</a>. |
| An active mailing list of NetBeans IDE users. You can search the archives or join the |
| list and ask your own questions.</p> |
| </body> |
| </html> |