You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Philippe CLEMENT (JIRA)" <ji...@apache.org> on 2014/04/14 16:44:17 UTC

[jira] [Commented] (KARAF-2830) Karaf scripts java version check should be more "flexible"

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

Jean-Philippe CLEMENT commented on KARAF-2830:
----------------------------------------------

The problem is the first egrep to match against ‘”([0-9]. [0-9]\..* [0-9])”’. In fact java version might be followed by a suffix like -ea.

The correct pattern should include this by adding .* which gives: ‘”([0-9]. [0-9]\..* [0-9]).*”’

> Karaf scripts java version check should be more "flexible"
> ----------------------------------------------------------
>
>                 Key: KARAF-2830
>                 URL: https://issues.apache.org/jira/browse/KARAF-2830
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>         Environment: Java8
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.4.0, 4.0.0, 3.0.2
>
>
> If the java -version output returns something different from x.x.x (like 1.7.0, which is the case with Java8), the Karaf script fails with:
> {code}
> ./karaf: line 242: [: : integer expression expected
> {code}



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