Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install the latest version of Eclipse Classic on Ubuntu 12.04 using the terminal?

Please how to install the latest Eclipse Classic (4.2) on Ubuntu 12.04 using the terminal? if you can direct me step-by-step, I would be grateful.

like image 211
CompilingCyborg Avatar asked Aug 17 '12 10:08

CompilingCyborg


People also ask

How do I open Eclipse in Ubuntu terminal?

To run Eclipse from anywhere in the Terminal, add the eclipse install directory to PATH environment variable. Append eclipse directory to the PATH. Save the file. Now we can launch Eclipse IDE on Ubuntu Linux from anywhere in the Terminal windows.

Where should I install Eclipse in Ubuntu?

You can either install it from the terminal or the software center in Ubuntu. Open the Software Center application in Ubuntu and search for Eclipse and install it from there.


2 Answers

Step 1 » Install java JDK or JRE

sudo apt-get install openjdk-7-jdk

Step 2 » Download latest copy from here http://www.eclipse.org/downloads/?osType=linux

Step 3 » Move the downloaded package to /opt directory

sudo mv eclipse-SDK-4.2.2-linux-gtk.tar.gz /opt

Step 4 » Extract the package

sudo tar -xvf /opt/eclipse-SDK-4.2.2-linux-gtk.tar.gz -C /opt

Step 5 » Create a new desktop file eclipse.desktop in /usr/share/applications/ and add the below lines .

[Desktop Entry]
Name=Eclipse 
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop

Step 6 » Simply drag this eclipse.desktop file to the launcher.

Check this link : install eclipse in ubuntu 12.04

like image 71
krizna Avatar answered Sep 18 '22 18:09

krizna


See this blog post here, for step-by-step instructions.

The process is documented step-by-step and in the comments the author has included a script -

#!/bin/sh

ECLIPSE=/usr/lib/eclipse/eclipse

inject_update_site(){
if [ ! -e "$1" ] ; then
echo "W: Cannot find $1" 2>&1
return 1
fi
cat - >>"$1" <<EOF
repositories/http\:__download.eclipse.org_releases_indigo/enabled=true
repositories/http\:__download.eclipse.org_releases_indigo/isSystem=false
repositories/http\:__download.eclipse.org_releases_indigo/nickname=Indigo Update Site
repositories/http\:__download.eclipse.org_releases_indigo/uri=http\://download.eclipse.org/releases/indigo/
EOF

}

if [ ! -d ~/.eclipse/ ] ; then
$ECLIPSE -clean -initialize || exit $?
artifact=$(find ~/.eclipse \
-regex .*/profileRegistry/.*/org.eclipse.equinox.p2.artifact.repository.prefs)
metadata=$(find ~/.eclipse \
-regex .*/profileRegistry/.*/org.eclipse.equinox.p2.metadata.repository.prefs)
if [ -z "$artifact" ] || [ -z "$metadata" ]; then
echo "W: Cannot inject update-sites, cannot find the correct config." 2>&1
else
( inject_update_site "$artifact" && \
inject_update_site "$metadata" && \
echo "I: Injected update sites" ) || echo "W: Could not inject update sites." 2>&1
fi
fi

exec $ECLIPSE "$@"

which works.

like image 39
Mark Hillick Avatar answered Sep 17 '22 18:09

Mark Hillick