Book Image

Java EE 5 Development with NetBeans 6

Book Image

Java EE 5 Development with NetBeans 6

Overview of this book

Table of Contents (17 chapters)
Java EE 5 Development with NetBeans 6
Credits
About the Author
About the Reviewers
Preface
Identifying Performance Issues with NetBeans Profiler

Installing NetBeans


NetBeans requires a Java Development Kit (JDK) version 5.0 or newer to be available before it can be installed.

Note

Since this book is aimed at experienced Java Developers, we will not spend much time explaining how to install and configure the JDK, since we can safely assume the target market for the book more than likely has a JDK installed. Installation instructions for JDK 6 Update 3 (the latest at the time of writing) can be found at http://java.sun.com/javase/6/webnotes/install/index.html.

Readers wishing to use Mac OS X can get installation instructions and the JDK download for their platform at http://developer.apple.com/java/, please note that Java 5 is supplied as standard with OS X 10.4 and above, as such Mac OS X developers should not need to download the JDK.

NetBeans installation varies slightly between the supported platforms. In the following few sections we'll look at how to install NetBeans on each supported platform.

Microsoft Windows

For Microsoft Windows platforms, NetBeans is downloaded as an executable file named something like netbeans-6.5-windows.exe (the exact name depends on the version of NetBeans and the NetBeans pack that was selected for download). To install NetBeans on Windows platforms, simply navigate to the folder where NetBeans was installed and double-click on the executable file that was downloaded.

Mac OS X

For Mac OS X, the downloaded file is called something like netbeans-6.5-macosx.dmg (the exact name depends on the NetBeans version and the NetBeans pack that was selected for download). In order to install NetBeans, navigate to the location where the file was downloaded and double-click on it.

The Mac OS X installer contains four packages: NetBeans, Glassfish, Tomcat, and OpenESB. These four packages need to be installed individually; they can be installed by simply double-clicking on each one of them. Please note that GlassFish must be installed before.

Linux and Solaris

For Linux and Solaris, NetBeans is downloaded in the form of a shell script. The name of the file will be something like netbeans-6.5-linux.sh, netbeans-6.5-solaris-x86.sh, and netbeans-6.5-solaris-sparc.sh, depending on the version of NetBeans, the selected platform, and the selected NetBeans pack.

Before NetBeans can be installed in these platforms, the downloaded file needs to be made executable, this can be done in the command line by navigating to the directory where the NetBeans installer was downloaded and executing the following command:

chmod +x ./filename.sh

Substitute filename.sh with the appropriate file name for the platform and NetBeans pack.

Once the file is executable it can be installed from the command line:

./filename.sh

Again, substitute filename.sh with the appropriate file name for the platform and NetBeans pack.

Other Platforms

For other platforms, NetBeans can be downloaded as a platform independent zip file. The name of the zip file will be something like netbeans-6.5-200811261600.zip (the exact file name may vary, depending on the version of NetBeans downloaded and the NetBeans pack that was selected).

To install NetBeans on one of these platforms, simply extract the zip file to any suitable directory.

Installation Procedure

Even though the way to execute the installer varies slightly between platforms, the installer behaves in a similar way between all of them.

Note

One exception is the Mac OS X installer. Under Mac OS X, each individual component (NetBeans, GlassFish, Tomcat, and OpenESB) comes with its own installer and must be installed individually. GlassFish must be installed before OpenESB.

Another exception is the platform-independent zip file; in this case there is essentially no installer. Installing this version of NetBeans consists of extracting the zip file to any suitable directory.

After executing the NetBeans installation file for our platform, we should see a window similar to the one illustrated in the following screenshot:

The packs shown may vary depending on the NetBeans pack that was downloaded, the previous screen shot is for the All pack.

At this point we should click on the button labeled Next> to continue the installation.

NetBeans is dual licensed. Licenses for NetBeans include the GNU Public License (GPL) version 2 with CLASSPATH exception, and the Common Development and Distribution License (CDDL). Both of these licenses are approved by the Open Source Initiative (OSI).

To continue installing NetBeans, click on the checkbox labeled I accept the terms in the license agreement and click on the button labeled Next>.

At this point the installer will prompt us for a NetBeans installation directory, and for a JDK to use with NetBeans. We can either select new values for these or take the provided defaults.

Once we have selected the appropriate installation directory and JDK, we need to click on the button labeled Next> to continue the installation.

The installer will now prompt us for an installation directory, JDK and other information for the GlassFish 2 application server, usually the defaults are sensible, but we can change them if we have a reason to.

At this point the installer will prompt us for an installation directory for the GlassFish 3 application server, providing a sensible default.

At this point the installer will display a summary of our choices, after reviewing the summary, we need to click on the button labeled Install to begin the installation.

At this point installation will begin, the installer displays a progress bar indicating how far along in the installation it is.

After NetBeans and all related components have been installed, the installer indicates a successful installation.

On most platforms, the installer places a NetBeans icon on the desktop, the icon should look like the following image: