#!/bin/sh
#---------------------------------------------------------------------------
# For Unix/Linux
#
# Start the MM3-WebAssistant - Proxy Offline Browser
#
#   JAVA_JRE   This environment variable must point to your Java Virtuale Machine (JRE).
#              example: JAVA_JRE=/usr/lib/sun/jre1.5.0/bin/java

echo
echo "MM3-WebAssistant can be usually started also without a console."
echo "Please click on the file: MM3-WebAssistant.jar"
echo 
echo "See: http://www.proxy-offline-browser.com/faq.html#fileType"
echo 


JAVA_JRE=java

# Change to the directory which contains the file MM3-WebAssistant.jar.
cd `dirname $0`


"$JAVA_JRE" -jar MM3-WebAssistant.jar


if [ "$?" != "130" ]; then
  echo
  echo "Java isn't installed"
  echo "or the environment variable is not defined correctly."
  echo "Please install Java or define the environment variable in this script-file."
  echo
  echo "You find downloads for Java locally:"
  echo "documentation/private/en/getJava.html"
  echo
  firefox "`dirname $0`/documentation/private/en/getJava.html" &
fi