comparison build-aux/javaexec.sh.in @ 7017:005fe24b840a

Update javaexec module from GNU gettext 0.15.
author Bruno Haible <bruno@clisp.org>
date Sat, 22 Jul 2006 15:17:55 +0000
parents 4336eef19b2e
children bbbbbf4cd1c5
comparison
equal deleted inserted replaced
7016:518e17651b9d 7017:005fe24b840a
1 #!/bin/sh 1 #!/bin/sh
2 # Execute a Java program. 2 # Execute a Java program.
3 3
4 # Copyright (C) 2001 Free Software Foundation, Inc. 4 # Copyright (C) 2001, 2006 Free Software Foundation, Inc.
5 # Written by Bruno Haible <haible@clisp.cons.org>, 2001. 5 # Written by Bruno Haible <haible@clisp.cons.org>, 2001.
6 # 6 #
7 # This program is free software; you can redistribute it and/or modify 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 8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option) 9 # the Free Software Foundation; either version 2, or (at your option)
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details. 15 # GNU General Public License for more details.
16 # 16 #
17 # You should have received a copy of the GNU General Public License 17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software Foundation, 18 # along with this program; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 20
21 # This uses the same choices as javaexec.c, but instead of relying on the 21 # This uses the same choices as javaexec.c, but instead of relying on the
22 # environment settings at run time, it uses the environment variables 22 # environment settings at run time, it uses the environment variables
23 # present at configuration time. 23 # present at configuration time.
24 # 24 #
25 # This is a separate shell script, because it must be able to unset JAVA_HOME 25 # This is a separate shell script, because it must be able to unset JAVA_HOME
26 # in some cases, which a simple shell command cannot do. 26 # in some cases, which a simple shell command cannot do.
27 # 27 #
28 # The extra CLASSPATH must have been set prior to calling this script. 28 # The extra CLASSPATH must have been set prior to calling this script.
29 29
30 CONF_JAVA='@JAVA@' 30 CONF_JAVA='@CONF_JAVA@'
31 CONF_CLASSPATH='@CLASSPATH@' 31 CONF_CLASSPATH='@CLASSPATH@'
32 if test -n "$CONF_JAVA"; then 32 if test -n "@HAVE_JAVA_ENVVAR@"; then
33 # Combine given CLASSPATH and configured CLASSPATH. 33 # Combine given CLASSPATH and configured CLASSPATH.
34 if test -n "$CLASSPATH"; then 34 if test -n "$CLASSPATH"; then
35 CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+@CLASSPATH_SEPARATOR@$CONF_CLASSPATH}" 35 CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+@CLASSPATH_SEPARATOR@$CONF_CLASSPATH}"
36 else 36 else
37 CLASSPATH="$CONF_CLASSPATH" 37 CLASSPATH="$CONF_CLASSPATH"
41 exec $CONF_JAVA "$@" 41 exec $CONF_JAVA "$@"
42 else 42 else
43 unset JAVA_HOME 43 unset JAVA_HOME
44 export CLASSPATH 44 export CLASSPATH
45 if test -n "@HAVE_GIJ@"; then 45 if test -n "@HAVE_GIJ@"; then
46 test -z "$JAVA_VERBOSE" || echo gij "$@" 46 # In this case, $CONF_JAVA is "gij".
47 exec gij "$@" 47 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
48 exec $CONF_JAVA "$@"
48 else 49 else
49 if test -n "@HAVE_JAVA@"; then 50 if test -n "@HAVE_JAVA@"; then
50 test -z "$JAVA_VERBOSE" || echo java "$@" 51 # In this case, $CONF_JAVA is "java".
51 exec java "$@" 52 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
53 exec $CONF_JAVA "$@"
52 else 54 else
53 if test -n "@HAVE_JRE@"; then 55 if test -n "@HAVE_JRE@"; then
54 test -z "$JAVA_VERBOSE" || echo jre "$@" 56 # In this case, $CONF_JAVA is "jre".
55 exec jre "$@" 57 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
58 exec $CONF_JAVA "$@"
56 else 59 else
57 if test -n "@HAVE_JVIEW@"; then 60 if test -n "@HAVE_JVIEW@"; then
58 test -z "$JAVA_VERBOSE" || echo jview "$@" 61 # In this case, $CONF_JAVA is "jview".
59 exec jview "$@" 62 test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@"
63 exec $CONF_JAVA "$@"
60 else 64 else
61 echo 'Java virtual machine not found, try installing gij or set $JAVA, then reconfigure' 1>&2 65 echo 'Java virtual machine not found, try installing gij or set $JAVA, then reconfigure' 1>&2
62 exit 1 66 exit 1
63 fi 67 fi
64 fi 68 fi