Bug 61679 - jmeter doesn't start with Java 9.0.1
Summary: jmeter doesn't start with Java 9.0.1
Status: RESOLVED DUPLICATE of bug 61529
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-27 14:27 UTC by Roman Levin
Modified: 2017-10-27 14:34 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Levin 2017-10-27 14:27:42 UTC
After installing jmeter, it fails to start:
```shell
$ jmeter
Error: Java version is too low to run JMeter. Needs at least Java >= 1.8.0
```

This because of this bit of shell script in `/usr/local/Cellar/jmeter/3.3/libexec/bin/jmeter`:
```sh
# Minimal version to run JMeter
MINIMAL_VERSION=1.8.0

# Check if Java is present and the minimal version requirement
_java=`type java | awk '{ print $ NF }'`
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
current_version=`echo $CURRENT_VERSION | awk -F'.' '{ print $2 }'`
if [ $current_version ]; then
        if [ $current_version -lt $minimal_version ]; then
                 echo "Error: Java version is too low to run JMeter. Needs at least Java >= ${MINIMAL_VERSION}." 
                 exit 1
        fi
    else
         echo "Not able to find Java executable or version. Please check your Java installation."
         exit 1
fi
```
which compares the `8` in `1.8.0` to the `0` in `9.0.1` (the `java` cask), thus deciding Java 9 is too old.

This is a [known issue](https://stackoverflow.com/questions/38128132/cant-run-jmeter-on-os-x-el-capitan).
Comment 1 Antonio Gomes Rodrigues 2017-10-27 14:31:25 UTC
Hi,

we are finalizing the migration to Java 9

For the moment, please use Java 8

Antonio
Comment 2 Philippe Mouawad 2017-10-27 14:34:52 UTC
Hello,
Thanks for report but If you read here:

http://jmeter.apache.org/download_jmeter.cgi

Or here:

http://jmeter.apache.org/changes.html

You'll see that JMeter 3.3 is not compatible with Java 9 yet as a lot of applications as Java 9 is a breaking version due to module.
This is tracked under Bug 61529


The nightly build is now compatible (except for the Windows shell) with Java 9 if you want to give it a try:

- http://jmeter.apache.org/nightly.html

The stackoverflow question you mention has no relation.

*** This bug has been marked as a duplicate of bug 61529 ***