Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6835129
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类: LINUX

2009-04-30 03:28:15

呵呵。搞了好几天,今晚终于把MYECLIPSE装上了。呵呵
方法如下:
1、使用源光盘安装ECLIPSE3。2。0。
2、使用vi /usr/bin/eclipse.将所有的MOZILLA_FIVE_HOME=之后的内容注释掉。然后加入:export MOZILLA_FIVE_HOME="",就可以了。我的/usr/bin/eclipse如下:
#!/bin/bash

# Having any sort of classpath causes massive breakage, with Kaffe at least.
unset CLASSPATH; export CLASSPATH

# Allow the user to specify their own Java home, we check for it later.
#unset JAVA_HOME; export JAVA_HOME

CMDLINEARGS=""
VMARGS=""
INSTALL="/usr/lib/eclipse"
STARTUP="/usr/lib/eclipse/startup.jar"

if [ -x /usr/bin/zenity ]; then
DIALOG=/usr/bin/zenity
DIALOGW="$DIALOG --warning"
elif [ -x /usr/bin/kdialog ]; then
DIALOG=/usr/bin/kdialog
DIALOGW="$DIALOG --warningyesno"
elif [ -x /usr/bin/xdialog ]; then
DIALOG=/usr/bin/xdialog
DIALOGW="$DIALOG --warning"
else
DIALOG=echo
DIALOGW="$DIALOG"
fi


# Make sure this directory exists.
if [ ! -d ~/.eclipse ]; then
mkdir ~/.eclipse > /dev/null 2>&1
if [ $? -ne 0 ]; then
$DIALOG \
--error \
--title="Could not launch Eclipse Platform" \
--text="Could not create settings directory at ~/.eclipse."
fi
fi

# Just in case Eclipse tries to put something in the home directory.
cd ~

# Load default settings from the user's configuration file.
if [ -f ~/.eclipse/eclipserc ]; then
. ~/.eclipse/eclipserc
fi

# Process the command line options. These override the eclipserc file, so we do
# them after parsing that file.
while [ "$1" ]; do
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Eclipse Starter Script"
echo "Usage:"
echo "eclipse [options [value]]"
echo "See eclipse(1) for more information."
echo ""
echo "Also see ~/.eclipse/eclipserc, which provides some default values"
exit 0
elif [ "$1" = "-vm" ]; then
shift
unset JAVA_HOME
JAVACMD="$1"
shift
elif [ "$1" = "-install" ]; then
shift
INSTALL="$1"
shift
elif [ "$1" = "-startup" ]; then
shift
STARTUP="$1"
shift
elif [ "$1" = "-vmargs" ]; then
shift
while [ "$1" ]; do
VMARGS="${VMARGS} $1"
shift
done
else
CMDLINEARGS="${CMDLINEARGS} $1"
shift
fi
done

# If the user has specified a custom JAVA, we check it for validity.
# JAVA defines the virtual machine that Eclipse will use to launch itself.
if [ -n "${JAVA_HOME}" ]; then
echo "using specified vm: ${JAVA_HOME}"
if [ ! -x "${JAVA_HOME}/bin/java" ]; then
$DIALOG \
--error \
--title="Could not launch Eclipse Platform" \
--text="The custom VM you have chosen is not a valid executable."
exit 1
fi
fi

# If the user has not set JAVA_HOME, cycle through our list of compatible VM's
# and pick the first one that exists.
if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
echo "searching for compatible vm..."
javahomelist=`cat /etc/eclipse/java_home | grep -v '^#' | grep -v '^$' | while read line ; do echo -n $line ; echo -n ":" ; done`
OFS="$IFS"
IFS=":"
for JAVA_HOME in $javahomelist ; do
echo -n " testing ${JAVA_HOME}..."
if [ -x "${JAVA_HOME}/bin/java" ]; then
export JAVA_HOME
echo "found"
break
else
echo "not found"
fi
done
IFS="$OFS"
fi

# If we don't have a JAVA_HOME yet, we're doomed.
if [ -z "${JAVA_HOME}" -a ! -n "${JAVACMD}" ]; then
$DIALOG \
--error \
--title="Could not launch Eclipse Platform" \
--text="A suitable Java Virtual Machine for running the Eclipse Platform could not be located."
exit 1
fi

# Set JAVACMD from JAVA_HOME
if [ -n "${JAVA_HOME}" -a -z "${JAVACMD}" ]; then
JAVACMD="$JAVA_HOME/bin/java"
fi

# Set path for the Mozilla SWT binding
#MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
export MOZILLA_FIVE_HOME=""
#if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
# :
#elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
# export MOZILLA_FIVE_HOME=/usr/lib/mozilla
#elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
# export MOZILLA_FIVE_HOME=/usr/lib/firefox
#elif [ -e /usr/lib/xulrunner/libgtkembedmoz.so ]; then
# export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
#elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
# export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
#elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
# export MOZILLA_FIVE_HOME=/usr/lib/mozilla
#else
# $DIALOGW \
# --title="Integrated browser support not working" \
# --text="This Eclipse build doesn't have support for the integrated browser."
# [ $? -eq 0 ] || exit 1
#fi

EXT=/usr/local/lib/eclipse/.eclipseextension
if [ ! -f $EXT ]; then
if ! touch $EXT 2>/dev/null; then
cat <<-EOF
Could not create $EXT. Please run as root:
touch $EXT
chmod 2775 $EXT
chown root:staff $EXT
EOF
fi
chmod 2775 $EXT 2> /dev/null || true
chown root:staff $EXT 2> /dev/null || true
fi

# libraries from the mozilla choosen take precedence
#LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# Do the actual launch of Eclipse with the selected VM.
exec /usr/lib/eclipse/eclipse \
-vm "${JAVACMD}" \
-install "${INSTALL}" \
-startup "${STARTUP}" \
${CMDLINEARGS} \
-vmargs -Djava.library.path=/usr/lib/jni \
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.2/classmap.db \
-Dgnu.gcj.runtime.VMClassLoader.library_control=never \
-Dosgi.locking=none ${VMARGS}
3、启动ECLIPSE然后进行升级,需要升级到3。2。2,因为MYECLIPSE5。5。1GA好像必须要在3。2。2下才你能跑起来。
4、安装JDK1。6。0_13,然后将/sur/bin/eclipse中的JAVA_HOME及CLASSPATH环境变量进行修改,因为我的JDK1。6。0_13安装在/usr/lib/eclipse/jdk1.6.0_13,所以我的以上两个环境变量配好了就是如下的内容:
unset JAVA_HOME; export JAVA_HOME=/usr/lib/eclipse/jdk1.6.0_13
unset CLASSPATH; export CLASSPATH=/usr/lib/eclipse/jdk1.6.0_13/jre/lib
5、去下载MyEclipse_5.5.1GA_UpdateSite.zip文件(其实就是离线升级包)
6、重启ECLIPSE,并在帮助-》软件更新-》中进行离线升级。
7、重启之后如果过程顺利就因该在主菜单中看到MYECLIPSE选项了。如图:
这是使用的MyEclipse Database Explorer,可以方便的连接ORACLE MYSQL SYBASE等数据库,并进行SQL语句操作。呵呵很方便的。

阅读(1832) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~