[vlma-devel] commit: Same error messages under Windows and UNIX. (Adrien Grand )

git version control git at videolan.org
Sun Aug 31 13:34:20 CEST 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Aug 31 13:36:17 2008 +0200| [4fc9e031a089480c902210ec21344b530cfff622] | committer: Adrien Grand 

Same error messages under Windows and UNIX.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=4fc9e031a089480c902210ec21344b530cfff622
---

 vlma-distribution/src/bin/vlma-env.sh |   27 +++++++++------------------
 vlma-distribution/src/bin/vlmad       |    5 +++--
 vlma-distribution/src/bin/vlmaw       |    6 ++++--
 3 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/vlma-distribution/src/bin/vlma-env.sh b/vlma-distribution/src/bin/vlma-env.sh
index 1638f60..a6c29c0 100644
--- a/vlma-distribution/src/bin/vlma-env.sh
+++ b/vlma-distribution/src/bin/vlma-env.sh
@@ -1,27 +1,18 @@
 # Find the JAVA executable
-if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]
+if [ -z "$JAVA_HOME" ]
 then
-    which java
-    if [ "x$?" = "x0" ]
-    then
-        JAVA=`which java`
-    else
-        echo "[ERROR] Cannot find the Java executable."
-        echo "Please ensure that Java Runtime Environment is installed and that the Java executable is on your PATH."
-        exit 1
-    fi
-fi
-if [ -z "$JRE_HOME" ]; then
-    JRE_HOME="$JAVA_HOME"
+    echo "[ERROR] JAVA_HOME is not defined."
+    echo "[ERROR] You either need to install a JDK 5.0 or later,"
+    echo "[ERROR] or to set the JAVA_HOME environment variable if a JDK is already installed."
+    exit 1
 fi
 
-if [ -z "$JRE_HOME" ]; then
-    JRE_HOME="$JAVA_HOME"
-fi
-JAVA="$JRE_HOME/bin/java"
+JAVA="$JAVA_HOME/bin/java"
+
 if [ ! -x "$JAVA" ]
 then
-    echo "[ERROR] $JAVA doesn't point to a valid executable."
+    echo "[ERROR] Cannot find the JAVA executable."
+    echo "[ERROR] Please verify that JAVA_HOME really points to a JDK installation."
     exit 1;
 fi
 
diff --git a/vlma-distribution/src/bin/vlmad b/vlma-distribution/src/bin/vlmad
index c668e46..13caa70 100644
--- a/vlma-distribution/src/bin/vlmad
+++ b/vlma-distribution/src/bin/vlmad
@@ -30,9 +30,10 @@ PRGDIR=`dirname $PRG`
 . $PRGDIR/vlma-env.sh
 
 # Set classpath
+VLMA_CLASSPATH=""
 for jar in $VLMA_LIBS/daemon/*
 do
-    CLASSPATH="$CLASSPATH:$jar"
+    VLMA_CLASSPATH="$VLMA_CLASSPATH:$jar"
 done
 
 # Set VLMA_OPTS
@@ -43,7 +44,7 @@ VLMA_OPTS="$VLMA_OPTS\
  -Dvlma.logs=$VLMA_LOGS\
  -Dvlma.work=$VLMA_WORK\
  -Dlog4j.configuration=file:$VLMA_CONF/log4j.properties\
- -classpath $CLASSPATH"
+ -classpath $VLMA_CLASSPATH"
 
 # Run VLMad
 OPTS="$VLMA_OPTS $JAVA_OPTS org.videolan.vlma.daemon.VLMad $COMMAND"
diff --git a/vlma-distribution/src/bin/vlmaw b/vlma-distribution/src/bin/vlmaw
index cea0630..d65ff87 100644
--- a/vlma-distribution/src/bin/vlmaw
+++ b/vlma-distribution/src/bin/vlmaw
@@ -27,10 +27,12 @@ PRGDIR=`dirname $PRG`
 . $PRGDIR/vlma-env.sh
 
 # Set classpath
+VLMA_CLASSPATH=""
 for jar in $VLMA_LIBS/web/*.jar
 do
-    CLASSPATH="$CLASSPATH:$jar"
+    VLMA_CLASSPATH="$VLMA_CLASSPATH:$jar"
 done
+VLMA_CLASSPATH="$VLMA_CLASSPATH:$JAVA_HOME/lib/tools.jar"
 
 # Set VLMA_OPTS
 VLMA_OPTS="$VLMA_OPTS\
@@ -41,7 +43,7 @@ VLMA_OPTS="$VLMA_OPTS\
  -Dvlma.webapps=$VLMA_WEBAPPS\
  -DSTOP.PORT=8079\
  -DSTOP.KEY=vlmaw\
- -classpath $CLASSPATH"
+ -classpath $VLMA_CLASSPATH"
 
 # Run VLMaw
 OPTS="$VLMA_OPTS $JAVA_OPTS org.mortbay.start.Main"



More information about the vlma-devel mailing list