Hemanth's Scribes

cli

Java and Eclipse on Ubuntu

Author Photo

Hemanth HM

Thumbnail

Java

JDK: Download here

JRE:

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

Eclipse

Download and extract:

cd /opt/
wget http://ganymede-mirror1.eclipse.org/technology/epp/downloads/release/ganymede/R/eclipse-jee-ganymede-linux-gtk.tar.gz
tar xvfz eclipse-jee-ganymede-linux-gtk.tar.gz

Finalizing Eclipse:

sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x $(sudo find eclipse -type d)

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

Paste the below, save and exit:

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

$ECLIPSE_HOME/eclipse $*

Make a launcher:

sudo gedit /usr/share/applications/eclipse.desktop

Paste the below, save and exit:

[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

Launch Eclipse:

eclipse -clean

P.S: The icon may fail to load, try alternative shortcut methods. From the next launch you can do it from Applications >> Programming >> Eclipse.

#java#linux
Author Photo

About Hemanth HM

Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.