1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/java/eclipse/files/eclipse.in
Norikatsu Shigemura 5362074527 Add eclipse 2.1, An open extensible IDE for anything and nothing
in particular.

Submitted by:	kan
2003-06-17 17:39:48 +00:00

48 lines
1.1 KiB
Bash

#!/bin/sh
#
# FreeBSD-specific startup script for Eclipse Platform
#
# See: http://www.eclipse.org
#
# $FreeBSD$
#
DEFAULT_JAVA_HOME=%%JAVA_HOME%%
ECLIPSE_HOME=%%ECLIPSE_HOME%%
DEFAULT_JAVA_CMD=java
#-----------------------------------------------------------------------------
# Determine configuration settings
#-----------------------------------------------------------------------------
# Determine the JDK home directory
if [ -z "${JAVA_HOME}" ]; then
JAVA_HOME=${DEFAULT_JAVA_HOME}
fi
# Determine 'java' executable
if [ -z "${JAVACMD}" ]; then
if [ -n "${JAVA_HOME}" ]; then
JAVACMD="${JAVA_HOME}/bin/java"
else
JAVACMD=${DEFAULT_JAVACMD}
fi
fi
# Check if 'java' executable can be found
if [ ! -x "$JAVACMD" ]; then
echo "Error: JAVA_HOME is not defined correctly: ${JAVA_HOME}"
echo " Unable to find ${JAVACMD}"
exit 1
fi
# Check if 'eclipse' executable can be found
if [ ! -x "${ECLIPSE_HOME}/eclipse" ]; then
echo "Error: ECLIPSE_HOME is not defined correctly: ${ECLIPSE_HOME}"
echo " Unable to find eclipse launcher binary"
exit 1
fi
PATH=${JAVA_HOME}/bin:$PATH "${ECLIPSE_HOME}/eclipse" $@