Skip to content

Instantly share code, notes, and snippets.

@eerohele
Last active October 11, 2015 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eerohele/3931030 to your computer and use it in GitHub Desktop.
Save eerohele/3931030 to your computer and use it in GitHub Desktop.
Eclipse Help Startup Script
#!/bin/bash
ECLIPSE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LOGFILE="$ECLIPSE_HOME/configuration/run.log"
JAVA_CLASS=org.eclipse.help.standalone.Infocenter
COMMAND=$1
PRODUCT=$2
PORT=$3
send_command() {
echo "Sending command \"$1\" to $JAVA_CLASS in port $PORT..."
if [ "$1" == "start" ]; then
echo "Logging into file $LOGFILE."
fi
java -classpath $ECLIPSE_HOME/plugins/org.eclipse.help.base*.jar \
$JAVA_CLASS -eclipsehome $ECLIPSE_HOME \
-command $1 -product $2 -port $3 -noexec > $LOGFILE 2>&1 &
}
if [ -z "$PORT" ]; then
PORT=8083
fi
if [ -z "$PRODUCT" ] && [ "$COMMAND" != "shutdown" ]; then
echo "Usage: $0 command product_name [port_number]"
exit 1
fi
send_command $COMMAND $PRODUCT $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment