There are many ways to do this, but only one way is showed in the following concept.
Software you have to download
1) Latest JDK version from Sun.
2) Latest release of web tools from eclipse.
3) Latest apache tomcat binary.
Install packages
Sun's Java JDK
Install java-package to repackage the jdk as a .deb file. Make sure you have enabled the repositories.
Code:
sudo apt-get install fakeroot java-package
Once we are done with this we create the .deb jdk package.
Code:
fakeroot make-jpkg jdk-1_5_xxxx-linux-i586.bin
Then we install the new package
Code:
sudo dpkg -i sun-j2sdk1.5xxxx+updatexxx_i386.deb
Make java configuration
Code:
sudo update-alternatives --config java
Tomcat
Download and copy tomcat
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 the users of tomcat
Code:
sudoedit /opt/tomcat/conf/tomcat-users.xml
Add an administration and your own
Code:
<user name="admin" password="admin" roles="manager,admin" />
<user name="yourname" password="blah" roles="manager,admin" />
Eclipse
Extract download and move eclipse to opt
Code:
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`
Create an eclipse executable in your path
Code:
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudoedit /usr/bin/eclipse
With this contents
Code:
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
Create a gnome menu item
Code:
sudoedit /usr/share/applications/eclipse.desktop
With this contents
Code:
[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
Now you are set to do java programs with Eclipse
Bookmarks