1#!/bin/sh 2# 3# Copyright (C) 2001 Free Software Foundation, Inc. 4# 5# Author: Nicola Pero <nicola@brainstorm.co.uk> 6# Date: April 2001 7# 8# This file is part of the GNUstep Makefile Package. 9# 10# This library is free software; you can redistribute it and/or 11# modify it under the terms of the GNU General Public License 12# as published by the Free Software Foundation; either version 2 13# of the License, or (at your option) any later version. 14# 15# You should have received a copy of the GNU General Public 16# License along with this library; see the file COPYING. 17# If not, write to the Free Software Foundation, 18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 20# This is a shell script which attempts to execute a specific Java 21# class (hardcoded when the shell script is installed), preparing 22# CLASSPATH and LD_LIBRARY_PATH for it. 23 24# 25# The name of the script 26# 27tool=$0 28 29# 30# The directory we are in 31# 32tool_dir=`dirname $tool` 33 34# 35# The java class to execute - harcoded when the template is intalled 36# by java-tool.make. This should be the full Java classname (eg, 37# gnu.gnustep.base.xxx) 38# 39java_obj_file=JAVA_OBJ_FILE 40 41# 42# Load up all the GNUstep environment. 43# 44. "$GNUSTEP_MAKEFILES/GNUstep.sh" 45 46# 47# Find java 48# 49java_vm=java 50if [ ! -z "$JAVA_HOME" ]; then 51 java_vm=${JAVA_HOME}/bin/java 52else 53 if [ ! -z "$JDK_HOME" ]; then 54 java_vm=${JDK_HOME}/bin/java 55 fi 56fi 57 58# 59# Run java on the object file. The class will be looked up in the classpath. 60# 61exec $java_vm $java_obj_file "$@" 62