Developing Software in J2EE

Developing Software in J2EE

Environment Consistency – NetBeans (Windows)

We need to make our life easier by creating consistency for every machine. What this means is every machine you try to use, whether it be yours or your colleagues, the environment will be the same when you sit down to help them with something. This is very important if you’re a Development Manager and you’re trying to help one of your staff.

This is one of several posts in regards to this subject.

Our IDE is going to be NetBeans. I will be the first to admit that NetBeans has issues sometimes and it can be frustrating. Maybe Eclipse is easier to use but I have been using NetBeans for a while and it’s built to write JAVA code so that’s what we’re going to be using. We will be using Version 6.7.1 of NetBeans but we’ll upgrade in a later post, I’m sure, when a new version becomes available.

Trying to work with as close to the default installation is really the best way to go. If you do that, you’ll have fewer problems, and if your system gets hosed then you can get your system back up and running quicker.

So for Windows we download the file netbeans-6.7.1-ml-windows.exe from NetBeans.org. We discussed installing NetBeans already for the Macintosh in an earlier post.

Start the installation process by clicking on this file. You’ll then see a screen while the installer is being configured:

Configuring NetBeans Installer

Configuring NetBeans Installer

also, while the installer is being configured you may see this screen:

Windows Firewall

Windows Firewall

All that’s going on here is that a check is being made to see if there is a new JDK out there.  Just click on Unblock and move on.

When the installer is done being configured you’ll see this screen:

Welcome to NetBeans Installer

Welcome to NetBeans Installer

I don’t like to install things that I don’t need.  So we’re going to click Customize here which will bring up this screen:

Configuring NetBeans Options

Configuring NetBeans Options

and then we’ll see this screen after we hit OK:

Welcome To NetBeans Installer

Welcome To NetBeans Installer

These are the only options that I want installed.  There seems to be a movement towards Glassfish but I haven’t gotten a chance to play with it yet so I’m not going to install it.  I also don’t want to install the version of Tomcat that NetBeans comes with.  But feel free to install any of these options if you want to, it really won’t hurt anything.  But keep it consistent in your environment.

Welcome To NetBeans Installer

Welcome To NetBeans Installer

So now we’ll click Next to get to the Software License Agreement screen:

Software License Agreement

Software License Agreement

Click on the checkbox for “I accept the terms in the license agreement” and click on Next to see this screen:

Installation Location and SDK

Installation Location and SDK

Make sure that it is configured to use the JDK we installed in a previous post.  It probably is by default but if it isn’t then you’ll need to Browse to find it.

NetBeans does a good job of keeping its customizations in a separate directory from the main install so I usually just leave the install directory as the default.

After you’ve made those adjustments, click Next and you’ll see the Summary screen:

Installation Summary

Installation Summary

Now we click Install and the installation process starts and you’ll see screens that look like this for a few minutes:

Installing NetBeans

Installing NetBeans

Once the Install is finished, you’ll see this screen.

Completed Install

Completed Install

Check or uncheck those boxes as you see fit and click Finish.

And we’re done.. or not. We need to start up NetBeans because we need to initialize part of it for when we configure Tomcat later.  So click on Start, All Programs, NetBeans and then click on NetBeans IDE 6.7.1 and you should see the following screen:

Starting Up NetBeans

Starting Up NetBeans

I’m sure at some point we’ll discuss the NetBeans start up procedures but for now it is starting up and it will take a couple of minutes. Just so you know, it takes a bit to start up when you have first rebooted your machine and then on subsequent starts it will be faster. After it is done you’ll see the following screen:

NetBeans Main Window

NetBeans Main Window

This is the main NetBeans window.  We need to initialize NetBeans for J2EE use and we do that by clicking on File, New Project and Java Web.

Note: Sometimes you do not have to do this.  I know during the Macintosh install of NetBeans that I did but for my Windows install I did not.  However, I know there have been times during the Window install that I did.  I’m telling you this because I couldn’t get the screen capture I wanted here. :)

After it’s done Activating Java Web and EE it will come to a screen for creating a new project. Just cancel out of it for now.

We have one last thing to configure. This is a personal preference of mine but I believe that it is time to leave the 80 column limit behind. Let’s expand out to 120 shall we? Click on Tools, Options, Editor and then Formatting. Put 120 in the Right Margin box and you’ll see this screen:

Fix columns width in editor

Fix columns width in editor

Click OK and now we’re done configuring. We’ll come back to NetBeans after we install Tomcat in a later post.

One more thing, if you want a clean install remove the .netbeans directory under c:\Documents and Settings\%USERNAME% where %USERNAME% is the name of the user you are logged in.  (For example mine is thcampbell).  After doing this, all you have to do is restart NetBeans and you basically have a fresh install.

October 25, 2009 - Posted by | Development Environment | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.