#!/bin/bash
#
# hawtjni-runtime script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
_prefer_jre="true"
. /usr/share/java-utils/java-functions

# Source system prefs
if [ -f /etc/java/hawtjni-runtime.conf ] ; then
  . /etc/java/hawtjni-runtime.conf
fi

# Source user prefs
if [ -f $HOME/.hawtjni-runtimerc ] ; then
  . $HOME/.hawtjni-runtimerc
fi

# Configuration
MAIN_CLASS=org.fusesource.hawtjni.generator.HawtJNI
BASE_FLAGS=""
BASE_OPTIONS=""
BASE_JARS="commons-cli commons-lang3 objectweb-asm/asm-all xbean/xbean-finder xbean/xbean-asm-util hawtjni/hawtjni-runtime hawtjni/hawtjni-generator"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"
