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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With