[ 
https://issues.apache.org/jira/browse/JCRVLT-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249252#comment-16249252
 ] 

Robert Munteanu commented on JCRVLT-184:
----------------------------------------

{noformat}diff --git a/vault-cli/src/main/appassembler/unix-template.sh 
b/vault-cli/src/main/appassembler/unix-template.sh
index d0a0634..7bbf6ba 100644
--- a/vault-cli/src/main/appassembler/unix-template.sh
+++ b/vault-cli/src/main/appassembler/unix-template.sh
@@ -121,7 +121,7 @@ if [ -n "$COLS" ]; then
     EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Denv.term.width=${COLS}"
 fi
 
-JAVA_VER=$($JAVACMD -version 2>&1 | sed 's/java version 
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
+JAVA_VER=$($JAVACMD -version 2>&1 | sed 's/\(java\|openjdk\) version 
"\(.*\)\.\(.*\)\..*"/\2\3/; 1q')
 
 if [ "$JAVA_VER" -lt 18 ]; then
     EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -XX:PermSize=128m 
-XX:-UseGCOverheadLimit"
{noformat}

[~tripod] - the following trivial patch works for me with both OpenJDK and 
Oracle's Java distribution.

> vlt shell script prints out error when using openjdk
> ----------------------------------------------------
>
>                 Key: JCRVLT-184
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-184
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>    Affects Versions: 3.1.40
>            Reporter: Robert Munteanu
>            Priority: Minor
>
> {noformat}$ vlt --version
> /usr/bin/vlt: line 141: [: openjdk version "1.8.0_131": integer expression 
> expected
> Jackrabbit FileVault [version 3.1.40] Copyright 2013 by Apache Software 
> Foundation. See LICENSE.txt for more information.{noformat}
> {noformat}$ java -version
> openjdk version "1.8.0_131"
> OpenJDK Runtime Environment (IcedTea 3.4.0) (suse-1.1-x86_64)
> OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode){noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to