blob: e393c16f2a540f456d048d11d4dee54ad7199942 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- -*- xhtml -*- -->
<title>What's New in NetBeans IDE 4.0</title>
<meta name="description"
content="Short Hello Web tutorial for NetBeans IDE 3.6">
<link rel="stylesheet" type="text/css"
href="https://netbeans.org/netbeans.css">
<meta name="author" content="gwielenga@netbeans.org">
<meta name="description"
content="An overview of What's New in NetBeans IDE 4.0.">
<!--
* Copyright ?2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
-->
</head>
<body>
<h1>What's New in NetBeans IDE 4.0</h1>
<div class="feedback-box">
<a href="/about/contact_form.html?to=3&amp;subject=Feedback:%20NetBeans%20IDE%204.0%Whats%20New%20in%2040">Feedback</a>
</div>
<p>NetBeans IDE 4.0 is a major feature release. The features listed below are introduced
in 4.0 since the previous release (3.6). The product has been completely overhauled to
allow you to develop and maintain your applications more
productively and efficiently than ever before. If you are a returning user, you will notice significant
enhancements in each area of your development cycle:</p>
<ul>
<li><a href="#creating">Managing Source Code and Libraries</a></li>
<li><a href="#editing">Editing</a></li>
<li><a href="#buildingandrunning">Building, Running, and Debugging</a></li>
</ul>
<p>For detailed information about transitioning to NetBeans IDE 4.0, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Transitioning from NetBeans IDE 3.6 to 4.0 Beta Guide</a>.
</p>
<h2><a name="creating"></a>Managing Source Code and Libraries</h2>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="15%"><a name="formatfontinjsp"></a><b>Projects</b></td>
<td valign="top">
<a href="../../../images_www/screenshots/4.0/ProjectSystem3.png" title="Project System Screenshot 3"><img src="../../../images_www/screenshots/4.0/ProjectSystem3-mid.png" border="0" alt="Project System Screenshot 3" style="float:right;" hspace="6"></a>
<a href="../../../images_www/screenshots/4.0/ProjectSystem2.png" title="Project System Screenshot 2"><img src="../../../images_www/screenshots/4.0/ProjectSystem2-mid.png" border="0" alt="Project System Screenshot 2" style="float:right;" hspace="6"></a>
<a href="../../../images_www/screenshots/4.0/ProjectSystem1.png" title="Project System Screenshot 1"><img src="../../../images_www/screenshots/4.0/ProjectSystem1-mid.png" border="0" alt="Project System Screenshot 1" style="float:right;" hspace="6"></a>
<p>Projects have been completely redesigned in NetBeans IDE 4.0. Now, all application development takes place within a project.
A project is a group of source files together with the settings that you define to build, run, and debug them.
You can split applications that involve large code bases into several projects and
create compilation dependencies between them. Then, when you build one of the projects, all the other projects on the
compilation classpath are built as well. You can share projects using the built-in support for the version control systems
CVS, VSS, and PVCS.</p>
<p>Multiple projects can be open at the same time so that you can quickly and easily switch from one to another
and work on many projects simultaneously. When you open a project, you can view its logical structure in the
Projects window and its file structure
in the Files window. Menus and toolbar buttons are provided so that you can perform one-click actions such as
the following on a project:</p>
<ul>
<li><img src="../../../images_www/screenshots/4.0/butt_build.png" width="16" height="16" alt="Build button"> Build</li>
<li><img src="../../../images_www/screenshots/4.0/butt_run.png" width="16" height="16" alt="Run button"> Run</li>
<li><img src="../../../images_www/screenshots/4.0/butt_debug.png" width="16" height="16" alt="Debug button"> Debug</li>
<li><img src="../../../images_www/screenshots/4.0/butt_attach.png" width="16" height="16" alt="Attach debugger button"> Attach Debugger</li>
</ul>
<p>In addition, you can perform these actions on single files too.</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><a name="formatfontinjsp"></a><b>Project templates and wizards</b></td>
<td valign="top">
<p>NetBeans IDE 4.0 includes project templates and wizards designed to support different types of project development.
For example, it contains a wizard to define a Java application project based on
a Java application project template.</p>
<p>NetBeans IDE 4.0 comes with the following templates for creating projects from scratch:</p>
<ul>
<li><b><img src="../../../images_www/screenshots/4.0/j2seProject.gif" width="16" height="16" alt="J2SE project icon">&nbsp;Java
Application.</b> Template for creating a skeleton J2SE project with a main class.</li>
<li><b><img src="../../../images_www/screenshots/4.0/j2seProject.gif" width="16" height="16" alt="J2SE project icon">&nbsp;Java
Class Library. </b>Template for creating a skeleton Java class library without a main class.</li>
<li><b><img src="../../../images_www/screenshots/4.0/webProjectIcon.gif" width="16" height="16" alt="standard web project icon">&nbsp;Web
Application.</b> Template for creating a skeleton web application.</li>
</ul>
<p>For more information about creating projects from scratch, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Quick Start Guide</a>
and the <a HREF="https://netbeans.org/kb/archive/index.html">Quick Start Guide for Web Applications</a>.
</p>
<p>NetBeans IDE 4.0 comes with the following templates for creating projects for your existing source files:</p>
<ul>
<li><b><img src="../../../images_www/screenshots/4.0/j2seProject.gif" width="16" height="16" alt="J2SE project icon">&nbsp;Java
Project with Existing Sources.</b> Template for creating a J2SE project based on your own Java sources. </li>
<li><b><img src="../../../images_www/screenshots/4.0/webProjectIcon.gif" width="16" height="16" alt="standard web project icon">&nbsp;Web
Project with Existing Sources.</b> Template for creating a web project based on your own web and Java sources.</li>
<li><b><img src="../../../images_www/screenshots/4.0/freeform-project.png" width="16" height="16" alt="free-form project icon">&nbsp;Java
Project with Existing Ant Script. </b> Template for creating a J2SE project based on your own Java sources, built using your own Ant build script.</li>
<li><b><img src="../../../images_www/screenshots/4.0/freeform-project.png" width="16" height="16" alt="free-form project icon">&nbsp;Web
Project with Existing Ant Script. </b> Template for creating a web project based on your own web and Java sources, built using your own Ant build script.</li>
<p><b>Note:</b> You do not need to know Ant to be able to work with NetBeans IDE 4.0. Only advanced users who know what Ant is and
how to use it should use the Project with Existing Ant Script templates. For more information, see <a href="#antintegration">Ant Integration</a> below.</p>
</ul>
<p>When you use NetBeans IDE 4.0 to browse the folders in your system, folders that are valid projects are flagged with the <img src="../../../images_www/screenshots/4.0/projectFolder.gif" width="16" height="16" alt="Project folder icon"> icon.</p>
<p>For more information about importing and using your own source files, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Importing Existing Java Source Code Guide</a>
and the <a HREF="https://netbeans.org/kb/archive/index.html">Importing Existing Web Applications Guide</a>.
</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><b>Support for the Java&trade; 2 Micro Edition (J2ME&trade;) MIDP 2.0 and CLDC 1.1 standards</b></td>
<td valign="top">
<a href="../../../images_www/screenshots/4.0/mobility1.png" title="Moblity Screenshot 1"><img src="../../../images_www/screenshots/4.0/mobility1-mid.png" border="0" alt="Moblity Screenshot 1" style="float:right;" hspace="6"></a>
<p>J2ME MIDP 2.0/CLDC 1.1 standard support in NetBeans IDE 4.0 lets you write, test, and debug applications for Java technology-enabled
mobile devices. NetBeans IDE 4.0 simplifies coding of these applications by providing templates for MIDlet and MIDlet suites and code
completion in the Source Editor for J2ME packages. In addition, you can integrate third-party emulators and create device
configurations for a robust testing environment.</p>
<p>NetBeans IDE 4.0 support for the J2ME MIDP 2.0/CLDC 1.1 standards includes the following:</p>
<ul>
<li>Integration with the J2ME Wireless Toolkit 2.2</li>
<li>Integration with other third-party emulator platforms</li>
<li>Integration of obfuscation and optimization support</li>
<li>Support for MIDP localization by enabling the integration of locale-specific components</li>
<li>Resolution of device fragmentation by enabling code development for device configurations</li>
<li>Over-the-Air (OTA) download testing</li>
<li>Several J2ME MIDP sample projects</li>
</ul>
<p>For information on creating or importing J2ME MIDP applications, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Quick Start Guide</a>
and the <a HREF="https://netbeans.org/kb/archive/index.html">Importing Existing J2ME MIDP Source Code Guide</a>.
</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><b>Tag library templates and wizards</b></td>
<td valign="top">
<p>NetBeans IDE 4.0 includes enhancements that simplify the creation of tag libraries.
You use wizards that are new in NetBeans IDE 4.0 to create tag handlers,
tag files, and tag library descriptors. Then, you develop tags either in the Java programming language
or in the syntax for the JavaServer Pages technology, or both.</p>
<p>NetBeans IDE 4.0 comes with the following tag library templates:</p>
<ul>
<li><b><img src="../../../images_www/screenshots/4.0/tags.gif" width="16" height="16" alt="TLD file icon">&nbsp;Tag library descriptor.
</b> Template for creating a tag library descriptor in JSP2.0 syntax (for J2EE1.4 projects) or in JSP1.2 syntax (for J2EE1.3 projects).</li>
<li><b><img src="../../../images_www/screenshots/4.0/tag16.gif" width="16" height="16" alt="Tag file icon">&nbsp;Tag file.
</b> Template for creating a tag file with sample code in either JSP or XML syntax.</li>
<li><b><img src="../../../images_www/screenshots/4.0/class.gif" width="16" height="16" alt="Tag handler icon">&nbsp;Tag handler.
</b> Template for creating a BodyTag handler or SimpleTag handler (JSP2.0) with sample Java source code.</li>
</ul>
<p>For more information about creating and using tag libraries, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Tag Library Tutorial</a>.
</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><a name="createjavaobjects"></a><b>Bundled tools</b></td>
<td valign="top">
<p>NetBeans IDE 4.0 is bundled with several tools that enhance development, code
completion, and compilation needs:</p>
<ul>
<li><img src="../../../images_www/screenshots/4.0/freeform-project.png" width="16" height="16" alt="free-form project icon"> Apache Ant</li>
<li><img src="../../../images_www/screenshots/4.0/tomcat5instance.gif" width="16" height="16" alt="tomcat 5 instance project icon"> Tomcat Server</li>
<li>API classes and documentation for the Servlet and JSP APIs</li>
<li>JavaServer Pages Standard Tag Library (JSTL)</li>
</ul>
<p>Apache Ant and Tomcat Server require no special set up and
can be used straight out-of-the-box. When you create a new project,
libraries appropriate to the project's type will automatically be
included in the project's classpath. Additionally, you can manually
include a library in a project's classpath.</p></td>
</tr>
</tbody>
</table>
<h2><a name="editing"></a>Editing</h2>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="15%"><a name="displaygraphicsinjava"></a><b>J2SE 5.0</b></td>
<td valign="top">
<p>J2SE 5.0 aims to ease development and improve the
scalability, performance, monitoring and manageability of your applications.
It is fully supported by NetBeans IDE 4.0. For example, you can use new J2SE 5.0
language constructs
such as enums, generics and metadata annotations
to build and edit your applications.
Features such as error annotations (error underlying) and
code folding can be used with J2SE 5.0 sources and the Source Editor supports
code completion and syntax highlighting of J2SE 5.0 language keywords.</p>
<p>For information about J2SE 5.0, see
<a HREF="http://java.sun.com/j2se/1.5.0/">New Features and Enhancements J2SE 5.0</a>.
</p>
</tr>
<tr>
<td valign="top" width="15%"><a name="displaygraphicsinjava"></a><b>Refactoring</b></td>
<td valign="top">
<p>Refactoring functionality has been integrated into the Source Editor. As a result,
you can make sweeping modifications to pieces of code without affecting their functionality.
You can use refactoring to do the following in NetBeans IDE 4.0:
<a href="../../../images_www/screenshots/4.0/Refactoring2.png" title="Refactoring Screenshot 2"><img src="../../../images_www/screenshots/4.0/Refactoring2_mid.png" border="0" alt="Refactoring Screenshot 2" style="float:right;" hspace="6"></a>
<a href="../../../images_www/screenshots/4.0/Refactoring1.png" title="Refactoring Screenshot 1"><img src="../../../images_www/screenshots/4.0/Refactoring1_mid.png" border="0" alt="Refactoring Screenshot 1" style="float:right;" hspace="6"></a>
<ul>
<li>Rename packages, classes, methods, and fields</li>
<li>Move classes from package to package</li>
<li>Encapsulate fields generates 'get' and 'set' methods and replaces the usage of
the original fields with these methods</li>
<li>Change method parameters </li>
<li>Find references, declarations, and usages of classes and their members</li>
</ul>
<p>Note that the Generate R/W Property
command has been removed, since the Encapsulate Fields command includes the same functionality.</p>
</tr>
<tr>
<td valign="top" width="15%"><b>Code completion</b></td>
<td valign="top"> <p>Code completion and syntax highlighting have been enhanced to include
the following:
<a href="../../../images_www/screenshots/4.0/taglib2.png" title="Refactoring Screenshot 2"><img src="../../../images_www/screenshots/4.0/taglib2-mid.png" border="0" alt="Refactoring Screenshot 2" style="float:right;" hspace="6"></a>
<a href="../../../images_www/screenshots/4.0/taglib1.png" title="Refactoring Screenshot 1"><img src="../../../images_www/screenshots/4.0/taglib1-mid.png" border="0" alt="Refactoring Screenshot 1" style="float:right;" hspace="6"></a>
<ul>
<li><img src="../../../images_www/screenshots/4.0/tags.gif" width="16" height="16" alt="TLD file icon"> Tag library descriptors conforming to the JSP2.0 or JSP1.2 specification</li>
<li><img src="../../../images_www/screenshots/4.0/tag16.gif" width="16" height="16" alt="Tag file icon"> Tag files in JSP syntax</li>
</ul>
Customizers are no longer supported for tag library descriptors and tag handlers, because you can now use
code completion in the Source Editor to edit their attributes, properties, and behavior.
</tr>
<tr>
<td valign="top" width="15%"><b>Import management</b></td>
<td valign="top">
<p>You manage external references in a Java source file by right-clicking in the Source Editor
and choosing Fix Imports from the contextual menu.
Import statements that are needed by your code are added, unused import statements are removed,
and unresolved identifiers are fixed. This menu item replaces the Import Management Tool.</p>
</tr>
<tr>
<td valign="top" width="15%"><b>Windowing system</b></td>
<td valign="top">
<a href="../../../images_www/screenshots/4.0/Outline.png" title="Windowing System"><img src="../../../images_www/screenshots/4.0/Outline_mid.png" border="0" alt="Windowing System" style="float: right;" hspace="6"></a>
Editing flexibility in NetBeans IDE 4.0 has been enhanced as follows:
<ul>
<li>Sliding auto-hide windows.</li>
<li>Multiple views per form object. You can easily switch
between different views of a single form object. As a result,
there is no need to open a new window per view because
you can see both the source view and the form view within the same tab of
the Form Editor.</li>
<li>Visual alignment with Aqua LookAndFeel on MacOS X.</li>
</ul>
</tr>
</tbody>
</table>
<h2><a name="buildingandrunning"></a>Building, Running, and Debugging</h2>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tbody>
<tr>
<td valign="top" width="15%"><a name="antintegration"></a><b>Ant integration</b></td>
<td valign="top">
<p>Apache Ant is the leading Java-based build tool used to standardize and automate
build and run environments for development. NetBeans IDE 4.0 builds its project infrastructure
directly on top of Ant. It stores all of the information
about your project in an Ant script, a properties file, and a few XML configuration files.
This means that you can build and run your projects outside of the IDE exactly the
same as inside the IDE.</p>
<p> You don't need to perform any special setup activities, because NetBeans
IDE 4.0 provides the following straight out-of-the-box:</p>
<ul>
<li>Apache Ant as a build engine</li>
<li>Project metadata as Ant build scripts</li>
<li>Ability to build applications outside of the IDE using Ant</li>
<li>Fully integrated support for unit testing (JUnit) of Java applications</li>
</ul>
<p>Beginning users don't have to know Ant to use the system, but the full
power of Ant is accessible to advanced Ant users. These users can customize
a project's build script or use their own to build a project.</p>
<p>For more information about writing and customizing Ant build scripts, see the
<a HREF="https://netbeans.org/kb/archive/index.html">Advanced Free-Form Project Configuration Guide</a>.
</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><a name="testing"></a><b>JSP compilation</b></td>
<td valign="top">
<p>As in NetBeans IDE 3.5, you can <i>compile</i> JSP files. In NetBeans IDE 3.6, you could only
<i>validate</i> JSP files. The Validate action prevented you from being able to translate the JSP code into a servlet.
Therefore, the Validate action did not discover syntax errors that occur at translation time or runtime.
This is now possible again.</p>
</td>
</tr>
<tr>
<td valign="top" width="15%"><a name="testing"></a><b>JUnit testing</b></td>
<td valign="top">
<p>Projects in NetBeans IDE 4.0 come with built-in support
for generating, developing and running unit tests using JUnit,
the de facto standard in Java code testing. You can
maintain a separate classpath for building
and running JUnit tests, regardless of whether you set it in your own Ant build script
or in NetBeans IDE 4.0.</p>
</td>
</tr>
</tbody>
</table>
</body>
</html>