blob: a9986267e1cc5320a90ac3b01518a7f4b9cecbf4 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001#!/bin/sh
2# JAVA classpath
3# Use the local variable CLASSPATH to add custom entries (e.g. JDBC drivers) to
4# the classpath. Separate multiple paths with ":". Enclose the value
5# in double quotes. Adding additional files or locations on separate
6# lines makes things clearer.
7# Note: If under running under cygwin use "/cygdrive/c/..." for "C:/..."
8# Example:
9#
10# Set the CLASSPATH to a jar file and a directory. Note that
11# "classes dir" is a directory of class files with a space in the name.
12#
13# CLASSPATH="usr/local/Product1/lib/product.jar"
14# CLASSPATH="${CLASSPATH}:../MyProject/classes dir"
15#
16CLASSPATH="@classpath@"
17
18# JVM parameters
19# If you want to modify the default parameters (e.g. maximum heap size -Xmx)
20# for the Java virtual machine set the local variable JVM_PARAMETERS below
21# Example:
22# JVM_PARAMETERS=-Xms100M -Xmx200M
23#
24# Below are the JVM parameters needed to do remote debugging using Intellij
25# IDEA. Uncomment and then do: JVM_PARAMETERS="$IDEA_REMOTE_DEBUG_PARAMS"
26# IDEA_REMOTE_DEBUG_PARAMS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
27#
28# JVM_PARAMETERS=
29
30#run with shared memory setup
31#if [ -n "${RUN_SHARED_MEM}"]; then
32# JVM_PARAMETERS="${JVM_PARAMETERS} -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,address=javadebug,suspend=y"
33#fi
34
35# ---------------------------------------------------------------------------
36# Default configuration. Do not modify below this line.
37# ---------------------------------------------------------------------------
38# Application specific parameters
39
40MAIN_CLASS="@main.class@"
41JVM_PARAMS="@jvm.params@"
42PROGRAM_PARAMS="@program.params@"
43
44# Cygwin support. $cygwin _must_ be set to either true or false.
45case "`uname`" in
46 CYGWIN*) cygwin=true ;;
47 *) cygwin=false ;;
48esac
49
50# For Cygwin, ensure paths are in UNIX format before anything is touched
51if $cygwin; then
52 [ -n "$JAVA_HOME" ] &&
53 JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
54 [ -n "$CLASSPATH" ] &&
55 CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
56fi
57
58# Try to find java virtual machine
59if [ -z "${JAVA}" ]; then
60 if [ -z "${JAVA_HOME}" ]; then
61 JAVA=java
62 else
63 JAVA=${JAVA_HOME}/bin/java
64 fi
65fi
66
67# Try to find directory where this script is located
68COMMAND="${PWD}/$0"
69if [ ! -f "${COMMAND}" ]; then
70 COMMAND="$0"
71fi
72BASEDIR=`expr "${COMMAND}" : '\(.*\)/\.*'`
73
74# For Cygwin, switch paths to Windows format before running java
75if $cygwin; then
76# JAVA=`cygpath --path --windows "$JAVA"`
77 CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
78fi
79
80# Run program
81${JAVA} ${JVM_PARAMS} ${JVM_PARAMETERS} -classpath "${CLASSPATH}" ${MAIN_CLASS} ${PROGRAM_PARAMS} $*