From f647cf947e37909adee2109bf56f5d987aa43ead Mon Sep 17 00:00:00 2001
From: brinn <brinn>
Date: Tue, 8 Mar 2011 20:05:12 +0000
Subject: [PATCH] fix: make passwd.sh find the Java executable

SVN: 20258
---
 openbis/dist/server/passwd.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/openbis/dist/server/passwd.sh b/openbis/dist/server/passwd.sh
index 037b78f3b81..a75d1b89966 100755
--- a/openbis/dist/server/passwd.sh
+++ b/openbis/dist/server/passwd.sh
@@ -11,6 +11,8 @@
 #    
 # -----------------------------------------------------------
 
+source `dirname "$0"`/setup-env
+
 APPLICATION_NAME=openbis
 
 #
@@ -23,15 +25,13 @@ fi
 WD="`dirname $bin`"
 cd "$WD/.."
 
-JAVA_BIN="$JAVA_HOME/bin/java"
-
-if [ ! -x "$JAVA_BIN" ]; then
+if [ ! -x "$JVM" ]; then
   echo "No java runtime environment executable found. You need to set the environment variable JAVA_HOME appropriately."
   exit 1
 fi
 
 
 LIB=webapps/$APPLICATION_NAME/WEB-INF/lib
-$JAVA_HOME/bin/java \
+$JVM \
    -cp $LIB/cisd-args4j.jar:$LIB/commons-lang.jar:$LIB/commons-io.jar:$LIB/commons-codec.jar:$LIB/jline.jar:$LIB/log4j.jar:$LIB/$APPLICATION_NAME.jar:$LIB/screening.jar \
    ch.systemsx.cisd.authentication.file.PasswordEditorCommand "$@"
-- 
GitLab