karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Assigned] (KARAF-3141) karaf startup script fails to start when $JAVA_HOME not set and system locale is NOT english
Date Tue, 05 Aug 2014 08:01:26 GMT

     [ https://issues.apache.org/jira/browse/KARAF-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré reassigned KARAF-3141:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré

> karaf startup script fails to start when $JAVA_HOME not set and system locale is NOT
english
> --------------------------------------------------------------------------------------------
>
>                 Key: KARAF-3141
>                 URL: https://issues.apache.org/jira/browse/KARAF-3141
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 3.0.1, 2.3.5
>         Environment: linux, zsh shell
>            Reporter: Josef Ludvíček
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>
> There is problem in bin/karaf startup script, if user doesn't have $JAVA_HOME property
setup and locale is other than english.
> problematic part of locateJava() function # around line 212
> {noformat}
> if [ "x$JAVA" = "x" ]; then
>         if [ "x$JAVA_HOME" != "x" ]; then
>             if [ ! -d "$JAVA_HOME" ]; then
>                 die "JAVA_HOME is not valid: $JAVA_HOME"
>             fi
>             JAVA="$JAVA_HOME/bin/java"
>         else
>             warn "JAVA_HOME not set; results may vary"
>             JAVA=`type java`
>             JAVA=`expr "$JAVA" : '.*is \(.*\)$'`      #HERE - "is in regex"
>             if [ "x$JAVA" = "x" ]; then
>                 die "java command not found"
>             fi
>         fi
>     fi
> {noformat}
> if locale is for example czech, result of `type java` is java *je* /usr/bin/java, 
> not expected java *is* /usr/bin/java. 
> This leads to:
> {noformat}
> ./bin/karaf 
> karaf: JAVA_HOME not set; results may vary
> karaf: java command not found
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message