[java-wrappers] 12/61: [java-wrappers] Fix the pattern problem when JAVA_HOME is missing

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Oct 24 17:55:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository java-wrappers.

commit 33b61015a61e08c8bfc89fb23fa574d5a840d1fe
Author: Vincent Fourmond <fourmond at debian.org>
Date:   Sat May 3 07:31:45 2008 +0000

    [java-wrappers] Fix the pattern problem when JAVA_HOME is missing
---
 debian/changelog      |  7 +++++++
 java-wrappers.sh      |  2 +-
 tests/find_runtime.sh | 12 ++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7d6c070..289ddf6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+java-wrappers (0.1.5) unstable; urgency=low
+
+  * Fix the pattern for conjuring up a JAVA_HOME when it is missing. 
+    (closes: #478054)
+
+ -- Vincent Fourmond <fourmond at debian.org>  Sat, 03 May 2008 09:30:16 +0200
+
 java-wrappers (0.1.4) unstable; urgency=low
 
   * Improved find_java_runtime to take several arguments
diff --git a/java-wrappers.sh b/java-wrappers.sh
index f982080..485d855 100644
--- a/java-wrappers.sh
+++ b/java-wrappers.sh
@@ -252,7 +252,7 @@ run_java() {
     # is absent. Idea coming from bug #404728.
     if [ -z "$JAVA_HOME" ]; then
 	full_cmd_path="$(readlink -f `which $JAVA_CMD`)"
-	JAVA_HOME="${full_cmd_path:bin/*}"
+	JAVA_HOME="${full_cmd_path%bin/*}"
 	java_debug "Using JAVA_CMD to find JAVA_HOME = '$JAVA_HOME'"
     fi
     if [ "$FORCE_CLASSPATH" ]; then
diff --git a/tests/find_runtime.sh b/tests/find_runtime.sh
new file mode 100644
index 0000000..7240b44
--- /dev/null
+++ b/tests/find_runtime.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# find_runtime.sh: A small test script for find_java_runtime
+# copyright 2008 by Vincent Fourmond.
+# Distributed under the same terms as java-wrappers itself.
+
+DEBUG_WRAPPER=1
+. ../java-wrappers.sh
+
+find_java_runtime 
+
+echo $JAVA_HOME
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-wrappers.git



More information about the pkg-java-commits mailing list