Skip to content

Instantly share code, notes, and snippets.

@olagache
Created August 21, 2012 15:56
Show Gist options
  • Save olagache/3416805 to your computer and use it in GitHub Desktop.
Save olagache/3416805 to your computer and use it in GitHub Desktop.
New launch-umongo.sh (need more tests)
#!/bin/sh
dir=`dirname $0`
cd $dir
if [ ${JAVA_HOME}"X" = "X" ] ; then
echo "please set JAVA_HOME"
return;
fi
export IMPORT_BASE_DIR=.
unset CLASSPATH
# Import all jar containt in the lib folder
for file in $( find $IMPORT_BASE_DIR/lib -name "*.jar")
do
CLASSPATH=$file:$CLASSPATH
done
CLASSPATH=$IMPORT_BASE_DIR/umongo.jar:$CLASSPATH
if [ -z $minHeap ]; then minHeap=64; fi
if [ -z $maxHeap ]; then maxHeap=512; fi
# sometimes runs better with opengl forced, but also has visual bugs: -Dsun.java2d.opengl=true
$JAVA_HOME/bin/java -classpath $CLASSPATH -Xms${minHeap}M -Xmx${maxHeap}M -Denv=$IMPORT_BASE_DIR/ -Djava.util.logging.config.file=./logging.properties com.edgytech.umongo.UMongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment