#! /bin/bash # # Tiny startup wrapper for the Eclipse 3.2.x series # # Copyright (c) 2004, Karl Trygve Kalleberg # Copyright (c) 2004, Gentoo Foundation # # Licensed under the GNU General Public License, version 2 # [[ -f $HOME/.eclipserc ]] && source $HOME/.eclipserc ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-3.2"} ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse" if [ ! -x ${ECLIPSE_BIN} ] ; then echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr exit -1 fi if [ $(whoami) == "root" ] ; then echo "!!! You are running Eclipse as root. Be advised that this will modify the contents of" echo "!!! /usr/lib/eclipse-3.2, and that such a modification may prevent you from safely" echo "!!! upgrading to later 3.2 revisions." echo echo "!!! To ensure correct behavior on your next upgrade, do:" echo "!!! 1) 'emerge unmerge \"=eclipse-sdk-3.2\"'" echo "!!! 2) 'rm -rf /usr/lib/eclipse-3.2'" echo "!!! 3) 'emerge eclipse-sdk'" fi if [[ -d /usr/lib/gecko-sdk/lib/ ]] && [[ -f /usr/lib/gecko-sdk/lib/libgtkembedmoz.so ]] ; then export MOZILLA_FIVE_HOME="/usr/lib/gecko-sdk/lib/" fi # workaround for bug #215150 if [[ $(java-config -f) == sun-jdk-1.6 || $(java-config -f) == sun-jre-bin-1.6 ]]; then if [[ $(java-config -g VERSION) == *1.6.0.06 || $(java-config -g VERSION) == *1.6.0.05 || $(java-config -g VERSION) == *1.6.0.04 ]]; then echo "Performing workaround for bug #215150" VM_ARGS="${VM_ARGS} -XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" fi fi exec ${ECLIPSE_BIN} "$@" -vmargs ${VM_ARGS}