#!/bin/bash

# get script path
pushd . > /dev/null
SCRIPT_PATH="${BASH_SOURCE[0]}";
  while([ -h "${SCRIPT_PATH}" ]) do
    cd "`dirname "${SCRIPT_PATH}"`"
    SCRIPT_PATH="$(readlink "`basename "${SCRIPT_PATH}"`")";
  done
cd "`dirname "${SCRIPT_PATH}"`" > /dev/null
SCRIPT_PATH="`pwd`"
popd  > /dev/null

# path definition
BIN_DIR_PATH="${SCRIPT_PATH}/../../.."
LAUNCHER_JAR="${BIN_DIR_PATH}/plugins/org.eclipse.equinox.launcher_*"
ICON_FILE="${SCRIPT_PATH}/../Resources/DA_icon.icns"

# launch dynamic analyzer by java command
java \
-XX:MaxPermSize=64m \
-Xms256m \
-Xmx512m \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-Xdock:icon=$ICON_FILE \
-XstartOnFirstThread \
-Dorg.eclipse.swt.internal.carbon.smallFonts \
-Dosgi.requiredJavaVersion=1.7 \
-jar $LAUNCHER_JAR

