#!/bin/sh
# 
# ObjectDB Server Script - for Unix / Linux / Solaris / Mac OS X
# 
# Note: Please set the JAVA_VM and OBJECTDB_JARS variables!

# Path of Java VM (a complete absolute path can be specified)
JAVA_VM="/usr/java/latest/bin/java"

# Path of ObjectDB jar file (a complete absolute path can be specified)
OBJECTDB_JARS="/opt/objectdb/bin/objectdb.jar"

# Prepare args (an input odb file if specified)
while [ $# -gt 0 ]; do
  ARGS="$ARGS $1"
  shift
done

# Launch ObjectDB Server:
exec ${JAVA_VM} -server -Xms1024M -Xmx8G -cp ${OBJECTDB_JARS} -Dcom.sun.management.jmxremote.port=10024 -Dcom.sun.management.jmxremote.ssl=false com.objectdb.Server $ARGS
