Wednesday, December 24, 2008

Install Eclipse 3.4 (jee) in Ubuntu 8.10

Download packages

Java - Application--Add/Remove -- Programming to get the latest version, as the time this is written, the version is 1.6
There are many articles about the java installation.

Eclipse - Eclipse website -eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
I download this one is because no plugin is required to run with Apache-tomcat

Tomcat -- apache website - the version i got is apache-tomcat-6.0.18.tar.gz

Install packages

Sun's Java JDK: Many ways to do this. there are many different way on the website. I will put one here later.

Tomcat:

tar xzf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /usr/local
cd /usr/local
sudo chown -R root:root apache-tomcat-6.0.18
sudo chmod -R +r apache-tomcat-6.0.18
sudo chmod +x `sudo find apache-tomcat-6.0.18 -type d`
sudo ln -s apache-tomcat-6.0.18 tomcat

Edit tomcat users:
sudo gedit /usr/local/tomcat/conf/tomcat-users.xml

And add an admin and your username and password:


user name="admin" password="admin" roles="manager,admin"
user name="yourname" password="blah" roles="manager,admin"
Eclipse:
Extract the eclipse download and move to opt.

tar zxvf eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
sudo mv eclipse /opt/eclipse
cd /opt
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`

Then create an eclipse executable in your path

sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo gedit /usr/bin/eclipse

With this contents

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*

Then create a gnome menu item

sudoedit /usr/share/applications/eclipse.desktop

With this contents

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

Configure

You now have a working eclipse.
But run this command first to initialise the set up.

/opt/eclipse/eclipse -clean

Then from here on you can run from the menu item
applications/programming/eclipse

3 comments:

Cynthia said...

Im having problems using this command: sudo chown -R +r apache-tomcat-6.0.24.

says invalid user +r ... Im trying to find out more...but Im stuck...

Thanks 4 any help

cyn

Cynthia said...

problem solved...sorry!

patrick said...

Thanks for the helpful information. Hope to hear more from you.
add your website in