Developing Software in J2EE

Developing Software in J2EE

Environment Consistency – NetBeans (Apple Macintosh)

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 the Apple Mac we download the file netbeans-6.7.1-ml-macosx.dmg from NetBeans.org.  We’ll discuss the Microsoft Windows environment in a later post.

Start the installation process by clicking on this file and then clicking on the package.  You’ll then see the Welcome screen:

Welcome to NetBeans Installer

Welcome to NetBeans Installer

Click Continue and then you’ll see the Software License Agreement screen:

Software License Agreement

Software License Agreement

Click Continue here and you’ll be asked to accept the Software License Agreement:

Agree to Software License Agreement

Agree to Software License Agreement

Click Agree here and now you’ll be asked to Select a Destination for your install.  Probably the default is the best way to go:

Choose Installation Destination

Choose Installation Destination

Click Continue here and the installation will start and you’ll see messages pop up on the screen like the following:

Install in progress

Install in progress

After a few minutes you’ll see this screen:

Installation Complete

Installation Complete

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 in Finder, click on Applications, NetBeans and then NetBeans 6.7.1 and you should see the following screen:

Start Up NetBeans

Start 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.  The screen will look like this:

Open New JAVA Web Project

Open New JAVA Web Project

Click Next and you’ll see this screen:

Initialize for J2EE

Initialize for J2EE

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 NetBeans, Preferences, Editor and then Formatting.  Put 120 in the Right Margin box and you’ll see this screen:

Fix column width in editor

Fix column width in editor

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

One more thing, if you want a clean install remove your ${HOME}/.netbeans directory but this will give you a clean install and you’ll need to re-initialize the J2EE environment like above and any other changes you might have made.

October 18, 2009 - Posted by Thomas Campbell | Development Environment | , , , , | 1 Comment

1 Comment »

  1. [...] October 19, 2009 by chimac Nice article if you are a programmer for J2EE.  Probably boring for everyone else.  Read more here. [...]

    Pingback by Environment Consistency – NetBeans (Apple Macintosh) « Chicago Mac/PC Support | October 19, 2009 | Reply


Leave a comment