如何使用终端在Ubuntu 12.04上安装最新版本的Eclipse Classic? [英] How to install the latest version of Eclipse Classic on Ubuntu 12.04 using the terminal?
本文介绍了如何使用终端在Ubuntu 12.04上安装最新版本的Eclipse Classic?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请问如何使用终端在Ubuntu 12.04上安装最新的Eclipse Classic(4.2)?如果你能引导我一步一步,我将不胜感激。
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.
推荐答案
看到这篇博客文章这里,分步说明。
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 "$@"
可以使用。
这篇关于如何使用终端在Ubuntu 12.04上安装最新版本的Eclipse Classic?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文