COP 2805 (Java II Project) Project #1
Install and Practice Using Eclipse and NetBeans

 

Due:  Tuesday, January 27 2009, by the start of class

Description:

For this project you will install and then explore Eclipse and NetBeans Java IDEs.  In either case you will need to have installed the JDK too, which in turn includes a JRE.

Part I — Eclipse

  1. Download and install Eclipse from eclipse.org.  Once you hit the download button you will see a choice of packages to download.  Choose either the Java or Java EE packages.

    Eclipse is easy to install on a Windows platform.  You download the zip file for Eclipse and extract the contents into C:\Program Files.  This creates a new sub-directory eclipse.  Open that folder and right-click on the file eclipse.exe.  Choose Copy.  Next, right-click on the Start button and click on Open.  Next open Programs.  Finally right-click in this window and chose Paste Shortcut.  (You can add additional short-cuts to your desktop or the quick launch bar, if desired.)

    Eclipse is now installed and ready to use.

  2. Now launch Eclipse.  It may ask a few questions such as where it should keep its files (the Eclipse workspace).  You can put this anywhere you like.  Personally I prefer to use either My Documents\Eclipse-workspace or C:\Temp\Eclipse-workspace, depending on if the computer is single user or multi-user.  (You can click the button to make Eclipse remember your choice.)
  3. On the Welcome page go to Overview → Workbench Basics → Workbench User Guide → Getting Started.  (This will give you an overview on how to Use and configure Eclipse.)

    After this go back to the Welcome page and chose Tutorials → Create Hello World Application.  (This will provide a step by step instruction on how to create the Hello World application.)

    If you lose the Welcome window, you can bring it back from the Help→Welcome menu.  There are many other tutorials and guides you can read.  Consider reading the CVS and ant tutorials.  You can find these in the Workbench User Guide.

    You can read the Eclipse Documentation online, especially the Workbench User Guide and the Java Development User Guide.

  4. Eclipse supports plug-ins, many of which are freely available.  This are in reality jar files placed into the Eclipse install directory.  There are hundreds available to extend Eclipse with additional functionality, such as XML editors, Junit test case editors, visual editors, UML GUI drawing tools (that generate Java code for you), Java EE tools, and visual AWT, swing, or SWT visual editors.

    A collection of these projects useful for Java and Java EE development has been bundled together under the name Ganymede, which is what you have installed.  To install other Eclipse plug-ins:

    1. Under the Help menu, click on Software Updates  Available Software.  You may have to add other sites for third party plug-ins.
    2. Check the check-box next to the items you want (and don't already have installed), and then click on the Install... button.  Note!  the visual editor plug-in for Eclipse isn't available yet!

    Feel free to explore other available plug-ins.  Even more plug-ins can be found at www.EclipsePluginCentral.com.  (Warning: You should learn the basic Eclipse platform first, because adding plug-ins complicates the user interface.)

  5. Once plug-ins are installed, you will want to keep them up to date.  You can manually check for updates using a similar procedure to the one above for installing new features.  Under the Help menu, click on Software Updates  Installed Software, and click on the Update... button.  There is also a setting under the preferences to cause Eclipse to automatically search for updates.
  6. You can explore the preferences and make a few changes, but don't make too many changes until you have learned Eclipse better (or the tutorials won't match what you see!).
  7. Explore the other features of Eclipse.
  8. Start a new Java project, add a new class Hello.  You should see a new file Hello.java in the Package Explorer window.  Right-click on it and chose open, and create another hello world (or other simple) application.  Your application should not be identical with the tutorial; make yours say something such as Hello from the world of Eclipse!.  Don't forget to add appropriate comments (and to delete pointless comments that Eclipse may insert automatically for you).

Part II — NetBeans

  1. Download and install NetBeans.  (Note: There is a Java JDK+NetBeans bundle you can download when you install the Java JDK.)  As with eclipse there are bundles of plug-ins you can use.  For our purposes you should download either the Java bundle or the All bundle.  Note this includes a Java EE server glassfish, version 2.  It also includes a pre-release of version 3; you need not install that.
  2. After the install is complete, you will want to update your software.  Use the Help→Check for Update to do this.
  3. You can read on-line tutorials and documentation from www.netbeans.org/kb/.  Feel free to read those but at least read the NetBeans IDE Java Quick Start Tutorial and the Basic Java Programming guides.
  4. Explore the features of NetBeans.  Feel free to explore and change the preferences, but don't change too much at first; you want the settings to match the tutorial!
  5. Create a simple Hello World type of Java application using NetBeans.  Your application should say something such as Hello from the world of NetBeans!.  Be sure to add appropriate comments (and delete any empty or pointless comments that NetBeans may automatically add).
  6. To create a new java application using NetBeans, Use the file menu and click on New Project....  Next select Java Application from the Java category, and click Next.

    Give your project a useful name (e.g., hello), and pick a name for the class that will be generated (e.g., hello.Hello).  Note the NetBeans automatically puts your classes in a package named after the project.  That is fine, or you could name the main class simply Hello to put it in the default, nameless package.  Leave Set as Main Project selected, and click Finish.

To be turned in:

A copy of your Java source code from the Hello World programs you created in steps I.8 and II.6.  You can send as email to (preferred).  If email is a problem for some reason, you may turn in a hard-copy.  In this case the pages should be readable, dated, and stapled together.  Your name should appear on the first page.

Please see your syllabus for more information about projects, about submitting projects.