Eclipse

" Eclipse is a kind of universal tool platform - an open extensible IDE for anything and nothing in particular."
Check out Eclipse.org for more information.

We will use Eclipse throughout the labs for this course.
This is a short introduction to the most important features of Eclipse.

First glance at Eclipse


This is what you see initially.
The Global Preferences are in Window -> Preferences.

Let's create a Java project



File -> New -> Project

Then select Java, Java Project, Then Next:



Enter a name for the project like J2EE-WebServices, and unselect Use default, then Browse, and choose the root directory of an existing project, like $LABPATH/ZeLabs/12-WebServices/eclipse/ws, then click on OK, then Finish
Say yes for the switch to the Java perspective
You should see something like this:



Project properties are: Right-click on the project, then Properties:







Adding jars to the CLASSPATH

Click on the Libraries tab, then Add External Jars....
Do not forget to select them in the tab Order and Export



Notion of Source Folder

Before you start to write code, it is highly recommended to create Source Folders for the different part of your application. By doing so, Eclipse automatically adds the sources to the CLASSPATH.
For a simple J2EE application where you have one EJB, once standalone client, you should create 2 Source Folders: , and one Folder:
Do not forget to create Packages. To create a Package, just right-click on a Source Folder, then New -> Package.

A simple Folder must not contain any Java source files, but can contain build.xml files, ...:





That was a short introduction to Eclipse, but still enough to start with...