OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 2 # Execute a Java program. |
| 3 |
| 4 # Copyright (C) 2001, 2006 Free Software Foundation, Inc. |
| 5 # Written by Bruno Haible <haible@clisp.cons.org>, 2001. |
| 6 # |
| 7 # This program is free software: you can redistribute it and/or modify |
| 8 # it under the terms of the GNU General Public License as published by |
| 9 # the Free Software Foundation; either version 3 of the License, or |
| 10 # (at your option) any later version. |
| 11 # |
| 12 # This program is distributed in the hope that it will be useful, |
| 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 # GNU General Public License for more details. |
| 16 # |
| 17 # You should have received a copy of the GNU General Public License |
| 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
| 20 # This uses the same choices as javaexec.c, but instead of relying on the |
| 21 # environment settings at run time, it uses the environment variables |
| 22 # present at configuration time. |
| 23 # |
| 24 # This is a separate shell script, because it must be able to unset JAVA_HOME |
| 25 # in some cases, which a simple shell command cannot do. |
| 26 # |
| 27 # The extra CLASSPATH must have been set prior to calling this script. |
| 28 |
| 29 CONF_JAVA='gij' |
| 30 CONF_CLASSPATH='D:\Program Files\Oracle\Berkeley DB 4.5.20\jar\dbexamples.jar;D:
\Program Files\Oracle\Berkeley DB 4.5.20\jar\db.jar;D:\Program Files\Oracle\Berk
eley DB 4.5.20\jar\debug\dbexamples.jar;D:\Program Files\Oracle\Berkeley DB 4.5.
20\jar\debug\db.jar' |
| 31 if test -n ""; then |
| 32 # Combine given CLASSPATH and configured CLASSPATH. |
| 33 if test -n "$CLASSPATH"; then |
| 34 CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+;$CONF_CLASSPATH}" |
| 35 else |
| 36 CLASSPATH="$CONF_CLASSPATH" |
| 37 fi |
| 38 export CLASSPATH |
| 39 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" |
| 40 exec $CONF_JAVA "$@" |
| 41 else |
| 42 unset JAVA_HOME |
| 43 export CLASSPATH |
| 44 if test -n "1"; then |
| 45 # In this case, $CONF_JAVA is "gij". |
| 46 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" |
| 47 exec $CONF_JAVA "$@" |
| 48 else |
| 49 if test -n ""; then |
| 50 # In this case, $CONF_JAVA is "java". |
| 51 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" |
| 52 exec $CONF_JAVA "$@" |
| 53 else |
| 54 if test -n ""; then |
| 55 # In this case, $CONF_JAVA is "jre". |
| 56 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" |
| 57 exec $CONF_JAVA "$@" |
| 58 else |
| 59 if test -n ""; then |
| 60 # In this case, $CONF_JAVA is "jview". |
| 61 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" |
| 62 exec $CONF_JAVA "$@" |
| 63 else |
| 64 echo 'Java virtual machine not found, try installing gij or set $JAVA,
then reconfigure' 1>&2 |
| 65 exit 1 |
| 66 fi |
| 67 fi |
| 68 fi |
| 69 fi |
| 70 fi |
OLD | NEW |