如何使用终端在Ubuntu 12.04上安装最新版本的Eclipse Classic?

Com*_*org 9 eclipse terminal installation ubuntu ubuntu-12.04

请问如何使用终端在Ubuntu 12.04上安装最新的Eclipse Classic(4.2)?如果你能一步一步指导我,我将不胜感激.

kri*_*zna 20

第1步»安装java JDK或JRE

sudo apt-get install openjdk-7-jdk
Run Code Online (Sandbox Code Playgroud)

第2步»从这里下载最新的副本 http://www.eclipse.org/downloads/?osType=linux

步骤3»将下载的包移至/ opt目录

sudo mv eclipse-SDK-4.2.2-linux-gtk.tar.gz /opt
Run Code Online (Sandbox Code Playgroud)

第4步»提取包

sudo tar -xvf /opt/eclipse-SDK-4.2.2-linux-gtk.tar.gz -C /opt
Run Code Online (Sandbox Code Playgroud)

步骤5»/ usr/share/applications /中创建一个新的桌面文件eclipse.desktop并添加以下行.

[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
Run Code Online (Sandbox Code Playgroud)

步骤6»只需将此eclipse.desktop文件拖到启动器即可.

检查此链接:在ubuntu 12.04中安装eclipse


Mar*_*ick 8

看到这个博客张贴在这里,为一步一步的指示.

该过程是逐步记录的,并且在评论中作者已经包含了一个脚本 -

#!/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 "$@"
Run Code Online (Sandbox Code Playgroud)

哪个有效.