Skip to content

Instantly share code, notes, and snippets.

@dweinstein
Created January 24, 2014 14:49
Show Gist options
  • Select an option

  • Save dweinstein/8598680 to your computer and use it in GitHub Desktop.

Select an option

Save dweinstein/8598680 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Start-up script for JEB (MacOS)
JAVA=`which java`
if [ ! -f "$JAVA" ];
then
echo "JEB requires a Java runtime environment, please install one."
exit -1
fi
cd `dirname $(greadlink -f $0)`
SCRIPTDIR=`pwd`
cd - >/dev/null
JEBDIPATH=$SCRIPTDIR/jebdi.jar
$JAVA -jar $JEBDIPATH
RETCODE=$?
if [ $RETCODE -lt 0 ];
then
exit $RETCODE
fi
JEBUPPATH=$SCRIPTDIR/jebup.jar
$JAVA -jar $JEBUPPATH
RETCODE=$?
if [ $RETCODE -lt 0 ];
then
exit $RETCODE
fi
JEBPATH=$SCRIPTDIR/jeb.jar
$JAVA -Xmx2048m -XX:-UseParallelGC -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=30 -jar $JEBPATH "$@" &> /dev/null &
# should any problem arise at start-up, uncomment the following line and comment the above line
#$JAVA -XstartOnFirstThread -Xmx2048m -XX:-UseParallelGC -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=30 -jar $JEBPATH "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment