Cargo fails to parse Java 9 version

Description

JdkUtils fails to parse the version string java version "9" that is emitted from java -version

1 2 3 4 Caused by: java.lang.NumberFormatException: For input string: "9"" at org.codehaus.cargo.container.internal.util.JdkUtils.parseMajorJavaVersion(JdkUtils.java:138) at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.createJvmLauncher(AbstractInstalledLocalContainer.java:399) at org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer.startInternal(AbstractInstalledLocalContainer.java:287)

Ref:

1 2 3 4 $ java -version java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

Status

Assignee

H

Reporter

H

Components

Fix versions

Affects versions

1.6.4

Priority

Major