COS 212 Fall 2009
Intro to NetBeans, Eclipse or another IDE Benji Shults

IDE required

In this class, you are no longer allowed to use a simple text editor such as Notepad, DOS-Edit, Blue-J, etc. You may be the fastest Notepad text editor in the world but that isn't enough anymore. Just like the best swimmer can't swim from Los Angeles to Hong Kong, your Notepad skills won't get you very far when you begin to work on big projects.

Therefore, you are now required to use a more sophisticated tool. I use Emacs for my text editing and NetBeans for organizing large projects. For projects like you will have in this course, Emacs is more than enough. For large team projects, you will probably someday want to learn something like NetBeans or Eclipse as well.

Once you discover how much faster you can do things using Emacs shortcuts, you will appreciate the fact that NetBeans and Eclipse can be set up to use those same key bindings.

The purpose of this assignment is to introduce you to one of these tools. You are not required to use one of these particular tools for the rest of the semester but you must be exposed to them in this lab and you must use something with similar features for the rest of the semester.

Some IDEs you might want to try include

Note that Microsoft's Visual Studio does not support Java. It supports a language called J++ which is extremely similar to Java. It also supports a language called C# which does to C++ what Java did to C. (In other words, C# is like Java but with a much more syntax.) Neither of these languages is Java so Visual Studio is not an option for Java development.

These days, I am recommending NetBeans. I might talk about some reasons for this in class.

Introduction to Emacs and JDEE

Emacs is the most powerful text editor in existence. It also has many add-on packages (such as the JDEE for Java development) that let the user do things like compile and run code at the press of a single key.

Like any such powerful tool, it takes a lot of time to learn and become proficient. But for every hour you put into learning it, you will save yourself about a year of typing time over the rest of your life.

Introduction to NetBeans

NetBeans is a tool that helps when working with a project with lots of files involved or when working with a team. Emacs has add-on packages that do everything these packages do, but some people prefer to use the mouse and click on menus and buttons rather than learning faster and wrist-healthier key-strokes. Also, with Emacs it can be a pain to install all the needed add-on packages but it is easier to install add-ons to NetBeans.

For example, I am currently working on a project that has 145 java files, about a hundred input files, and several people around the world who work on it with me. I use NetBeans to help me organize this. However, I still do most of my actual coding in Emacs.

Learn one of these!

For this assignment, you must use one of these development environments to write a program. Complete one of the following three parts. I recommend that you do Part II (NetBeans).

Part I: Emacs

Become familiar with Emacs.

This part of the lab should take at least one hour unless you already know Emacs. Please, take at least 40 minutes to do this. You will be glad you did.

Use Emacs to write a text file

JDE: write, compile, and run a Java program.

This should take less than one half hour.


        /**
        * This program is the classic "Hello, World" program written in
        * Java.  It really serves no useful purpose but to practice
        * using editing tools and feel the thrill of writing a first program.
        *
        * <p>Created: Today's Date Here
        *
        * @author Your Name Here
        */

        public class Hello {
        
        /**
        * This program prints "Hello, World." to the console.
        */
        public static void main(String[] args) {
        System.out.println("Hello, World.");
        }
        
        } // Hello


      

Part II: NetBeans

Become familiar with NetBeans

Download the latest version of NetBeans and install it on your machine. I recommend that you get the download that contains all packages because you will use them eventually.

Start a Project in NetBeans

Customize the project

Compiling and running

Write a text file

Part III: Eclipse

Become familiar with Eclipse

Download the latest version of Eclipse and install it on your machine.

Start a Project in Eclipse

Customize the project

Compiling and running

Write a text file

Turning in the result