|
Lines 6-11
Link Here
|
| 6 |
# They can then be selected from based on environment variables and the |
6 |
# They can then be selected from based on environment variables and the |
| 7 |
# configuration file. |
7 |
# configuration file. |
| 8 |
# |
8 |
# |
|
|
9 |
# Please have a look at the javavm(1) man page for more information. |
| 10 |
# |
| 9 |
# ---------------------------------------------------------------------------- |
11 |
# ---------------------------------------------------------------------------- |
| 10 |
# "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): |
12 |
# "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): |
| 11 |
# Maxim Sobolev <sobomax@FreeBSD.org> wrote this file. As long as you retain |
13 |
# Maxim Sobolev <sobomax@FreeBSD.org> wrote this file. As long as you retain |
|
Lines 43-55
Link Here
|
| 43 |
tryJavaCommand () { |
45 |
tryJavaCommand () { |
| 44 |
# Check for the command being executable and exec it if so. |
46 |
# Check for the command being executable and exec it if so. |
| 45 |
if [ -x "${1}" ]; then |
47 |
if [ -x "${1}" ]; then |
| 46 |
if [ ! -z "${SAVE_PATH}" ]; then |
48 |
if [ -z "$JAVAVM_PRINT_JAVA_HOME" -a -z "$JAVAVM_PRINT_JAVA_PROGRAM" ] ; then |
| 47 |
export PATH=${SAVE_PATH} |
49 |
if [ ! -z "${SAVE_PATH}" ]; then |
|
|
50 |
export PATH=${SAVE_PATH} |
| 51 |
fi |
| 52 |
|
| 53 |
exec "${@}" |
| 54 |
echo "${IAM}: error: couldn't run specified Java command - \"${1}\"" >&2 |
| 55 |
exit 1 |
| 56 |
else |
| 57 |
if [ -n "$JAVAVM_PRINT_JAVA_HOME" ] ; then |
| 58 |
echo "${JAVA_HOME}" |
| 59 |
else |
| 60 |
echo "${@}" |
| 61 |
fi |
| 62 |
exit 0 |
| 48 |
fi |
63 |
fi |
| 49 |
exec "${@}" |
|
|
| 50 |
fi |
64 |
fi |
| 51 |
|
|
|
| 52 |
echo "${IAM}: warning: couldn't run specified Java command - \"${1}\"" >&2 |
| 53 |
} |
65 |
} |
| 54 |
|
66 |
|
| 55 |
# |
67 |
# |