IDE Tutorials CSE 219 Fall 2005


  TOC: AkA Tactical Operations Center
Table of Contents: NetBeans Eclipse
Basics Tutorial NetBeans Eclipse
Debugging Tutorial NetBeans Eclipse
JUnit Testing Tutorial NetBeans Eclipse
CVS Tutorial NetBeans Eclipse
JAR Files Tutorial NetBeans Eclipse
CSE 219 HomePage

Eclipse Basics

This tutorial is to help students to setup and run a very basic java program using Eclipse. For more detailed information goto

http://www.eclipse.org/

  Oveture: Eclipse
The first step in using eclipse is to setup your workspace. The workspace is where you store your projects. Pick a directory click ok.




  The Curtin Opens
Now that we have chosen where to save our projects we are presented with the welcome screen. You can browse around here but for the sake of this tutorial lets just click the arrow in the upper right corner of the panel.




  Starting a New....Project
The first step once getting into the editor is to create a new project. To do this we click on the file menu and then hover over the new item and then click project from the menu that just appeared.




  Choosing Project Type
Once we clicked on new project the editor popped open a new window which will contain project types. You will notice that there are far fewer projects then in netbeans. This is beacuse eclipse has only been installed with java support. However if you wanted to you could install support for many other types of languages. Select Java Project from the list and then click next.




  Project Specifics
This window contains information on what to name your project and where it will be placed. Put the name of your project up top and select the other options as shown in the image.




  Act 1 Scene 2: Enter Eclipse
After we have taken care of setting up the project eclipse will put us into the java perspective. This will be useful for when we are coding however we need to add some resources so click the resource button in the upper right corner.




  Resources Matter
Now hat we are in the resources menu you will see that the window on the left hand side has changed from packages to navigator. This will allow us to go through our projects and add or remove files as we see fit.




  New Files: Part I
Now we need to add a new file too our project. You can click File then hover over new and either click file or other. If you click file it will just create the file and you have to prepare it. If you click other then it will bring up all things that you can add into the project.




  New Files: Part II
There are many options in this list and you can browse through them if you like, however we only need to add a class so click class then click next.




  New Class
This screen gives us alot of options in customizing how our class is added. The Source folder is where in the project to create the file. You can add a package if you like but for the purpose of this tutorial it is not necessary. Just fill out your class name and make sure the check box to make a main method is selected and click finish.




  The Running Program: Part I
To setup your project to run a particular project click the run menu then click run. This will bring up a dialog to help you setup the propper run command.




  The Running Program: Part II
Now that we are in this menu click the browse button for the main class so we can select which class to run.




  Choosing Your Class
Select your class from the list and then click OK. once you are back click he finish button.




  The Act of Running
First we need some code to execute so write a simple hello world program in the main class and then click the green play button on the tool bar to execute your program. By default eclipse will compile your program for you so you do not have to build it. This will allow you to see any errors you are making while you type rather then when you compile.




  Finally Some Results
After we click run eclipse will popup a console window at the bottom of the screen. This will show us all of our ouput that we print.




  Questions Comments Complaints?
If you have any questions or a way to make the tutorials better please speak with me or email me at dquigley at ic dot sunysb dot edu



(c) David Quigley