Tools » Install Eclipse

Install Eclipse

Last modified by Andreas Hahn on 2011/02/22 16:21

Install Eclipse

Windows

Verify you have a Java Runtime. This may not be present on newer Windows intallations.

  1. Load Eclipse from http://www.eclipse.org.
    Choose Eclipse IDE for Java EE Developers

When running under Win7 you need to start Eclipse as an Administrator ! (RunAs Administrator). Else the installation seems to be successful but in fact nothing gets installed. This is a bug in Eclipse Helios current release.
   

Ubuntu Linux

OpenJDK should have been installed by default on Ubuntu - Verify.

Do not install Eclipse from Ubuntu distribution directly. The reason is that the Ubuntu distro a usually quite behind the current release cycle of Eclipse and so we would have to go with an older version. Instead navigate to Eclipse.org and select the appropirate download (64/32 bit) of Eclipse IDE for Java EE Developers.
This will download a basic installation. Simply create an 'Eclipse'-folder in your home directory and copy the unzipped content into it. Add a starter to Eclipse and voila ... here we go.

Complete installation

Proceed with Help -> Install new Software -> Add Site:

For Subclipse SVN: No further action necessary on Windows-32 bit. Other systems may require installation of JavaHL http://subclipse.tigris.org/wiki/JavaHL 

Make work with Tomcat(6) (Ubuntu)

If we are going to debug from inside Eclipse with Ubuntu's Tomcat container then we cannot configure Tomcat in Eclipse
because certain directories are expceted an these differ with the default Ubuntu / Tomcat installation.
So we either need to fix this or we have to go give up the Ubuntu / Tomcat default isntallation.
Here's the fix for the Ubuntu install:

sudo apt-get install tomcat6
cd /usr/share/tomcat6
sudo ln -s /var/lib/tomcat6/conf conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat6 log
sudo chmod -R 777 /usr/share/tomcat6/conf

Install Ivy

Ivy is useful to manage all our dependencies to all the 3rd party libs that we use for development.
Choosing Ivy instead of Maven is the somewhat simpler and leaner approach of keeping all dependencies managed.
The benefit is that once Ivy is properly configured we will easily keep libs and their source code readily available together with our own development.

Verify your Ivy settings

In Eclipse open 'Window'->'Preferences' and verify / install your Ivy Settings from ivySettings.xml.
Make sure that 'Source types' contains 'source, src'. 

ScreenshotIvySettings.png

Check Ant / Ivy integration

Ant / Ivy integeration is only necessary if you are going to build your application with ivy.
It is also necessary if you want to compile and build a new shept.org - jar-file.

EclipseAntPathIvy.png

Apply UTF-8 default settings in Eclipse

Throughout all the examples we will be using UTF-8 character set.
The reason is that we don't want to stick with the limits of iso-8859-1 with respect to asia languages.
We need to teach Eclipse that we are going to use UTF-8 characterset at least on the following file types:

  • java
  • jsp|jspf|jspx
  • tag|tagx

Note that the settings for .properties need always to stay with the default (iso-8859-1) !
The reason is within Javas handling of .property files. Java doesn't take into account no matter what characterset is used within .property files it will always use iso-8859-1. So specifying a different charaset instead will lead to wrong representation of your i18 messages.
If you need to represent other characterset (for showing messages for asian languages e.g.) you will need to use a converter thats part of the JDK. Look for native2ascii converter in the JDK directories.

Subversion

Its useful to teach subversion of supporting automated tags in your classes comments containing author, revision and date to keep track of your changes automatically. You need to put these settings into Eclipse comment templates.

Set the subversion keywords Author Date Id Revision
http://wiki.oops.de/docs/OOPS/Svn%20Client

Hibernate Tools

Hibernate Tools provide a couple of useful functions

  • generation of a schema out of your annotated domain model
  • interactive definition of HQL (Hibernate Query Language)

First we have to create a 'Runnable configuration' by choosing 'Run'->'Run Configurations ...'.
Here we create a configuration for a project called 'Netradio'

HibernateToolsConsoleConfiguration.png

In the next step we configure the Code Generation options
Choose 'Run'->'Hibernate Code Configuration'

HibernateToolsCodeGeneration1.png
HibernateToolsCodeGeneration2.png

Install form templates in Eclipse IDE

As a final step we will install templates for segment creation into our Eclipse IDE.

There are 3 templates available to ease the creation of your first views:

Open Eclipse and select Window -> Preferences. In the preferences form type JSP in the upper left corner.
In the section JSP files mark the subitem Templates and click the upper right New... - button.
Preferences008.png

Complete the popped up form as shown in the screenshot below.
Name: Shept Table Template
Context: New tag
Description: Shept template for creation of tables
Click on table template and copy and paste its contents into the Pattern box.
Commit with Ok.
NewTemplate009.png

Repeat the same steps for the filter.
Name: Shept Filter Template
Context: New tag
Description: Shept template for creation of filters

You need to confirm on the Preferences-form with Apply

Repeat the same steps for the simple form.

Tags:
Created by Andreas Hahn on 2010/04/12 21:07

© 2011 shept.org - Andreas Hahn