EclipseWebTools

Differences between revisions 5 and 6
Revision 5 as of 2006-06-07 11:48:04
Size: 5576
Editor: 88-96-106-26
Comment: update for sun-java5 now in multiverse
Revision 6 as of 2006-06-07 12:50:36
Size: 5583
Editor: 88-96-106-26
Comment:
Deletions are marked like this. Additions are marked like this.
Line 164: Line 164:
    * Coldrick blog http://blogs.sun.com/roller/page/coldrick?entry=java_development_on_ubuntu_part
    * Web Tools Tutorial http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html
    * Don Parks Daily Habit http://www.docuverse.com/blog/donpark/EntryViewPage.aspx?guid=f171bafc-abce-4d2e-a18b-3aba4ad32c52
    * [ http://blogs.sun.com/roller/page/coldrick?entry=java_development_on_ubuntu_part Coldrick blog]
    * [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html Web Tools Tutorial]
    * [http://www.docuverse.com/blog/donpark/EntryViewPage.aspx?guid=f171bafc-abce-4d2e-a18b-3aba4ad32c52 Don Parks Daily Habit]

Eclipse Web Tools

How to install Eclipse in Ubuntu.

Including Web tools, Apache Tomcat, Sun's JDK and icons

There are many ways to do this. This is only one method, but it works.

This is based on a howto by IvarAbrahamsen and information gathered from many references. As the old university excuse goes: "Copy from one source is plagiarism, copy from two or more is research".

Ubuntu does come with many eclipse packages in the universal repositories. Unfortunetly (or not) these all rely on the GCJ compiler, and not the genuine Sun one. Many still prefer Sun's java and this howto show how to use it.

Before Dapper, Ubuntu 6.06, Sun's licenses were not not compatible with Ubuntu's repositories and therefor had to be seperatly downloaded. From Dapper there are packages in the multiverse repository. This howto creates a .deb package from a download.

Download software

Sun JDK

If you chose not to use the sun-java5 package in multiverse, then download the latest JDK from Sun., which currenly is Tiger, 1.5. Choose the latest jdk update, and then choose the self extracting non rpm file, eg. jdk-1_5_0_06-linux-i586.bin

http://java.sun.com/j2se/1.5.0/download.jsp

Eclipse Web Tools

Download the latest release of web tools from eclipse. I use the full package of release 1.0. E.g. wtp-all-in-one-sdk-1.0.2-linux-gtk.tar.gz. (Ps. its about 170Mb so might take awhile depending of bandwidth.)

http://download.eclipse.org/webtools/downloads/

Apache Tomcat

Fetch the latest apache tomcat binary. Choose the core tar.gz file.

http://tomcat.apache.org/download-55.cgi

Install packages

Sun's Java JDK

Multiverse

Either install multiverse package

sudo apt-get install sun-java5

Download

Or (especially if using Breezy or earlier) install fakeroot and java-package to be able to repackage the jdk as a .deb Make sure you have enabled the universe repositories.

sudo apt-get install fakeroot java-package

Once that is done we create the .deb jdk package.

fakeroot make-jpkg jdk-1_5_xxxx-linux-i586.bin

Some interaction is required, and there will be the odd permission error etc, but should be fine.

Then we install this new package

sudo dpkg -i sun-j2sdk1.5xxxx+updatexxx_i386.deb

Make Sun's Java your java...

sudo update-alternatives --config java

Choose the Sun JDK

Apache Tomcat

Untar download and copy to /opt

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

Edit tomcat users

sudoedit /opt/tomcat/conf/tomcat-users.xml

And add an admin and your own?

<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 xzf wtp-all-in-one-sdk-1.0-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
sudoedit /usr/bin/eclipse

With this contents

#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

Finished

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

Add Projects

Follow this tutorial to create web projects and to add tomcat as the server for this project, [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html]

The Tomcat publishing is bothersome if your project structure is not a particular standard. IvarAbrahamsen have started a document on how to set up your projects. [http://flurdy.com/docs/eclipse/project.html]

References


CategoryDocumentation

EclipseWebTools (last edited 2008-08-06 16:19:00 by localhost)