Bug 61679

Summary: jmeter doesn't start with Java 9.0.1
Product: JMeter - Now in Github Reporter: Roman Levin <romanlevin>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED DUPLICATE    
Severity: major CC: p.mouawad
Priority: P2    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: All   

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 ***
Comment 3 The ASF infrastructure team 2022-09-24 20:38:10 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4550