-2

Unable to launch JMeter from terminal getting this error:

./jmeter.sh: 98: [: Illegal number: ./jmeter: 128: [: Illegal number:
./jmeter: 192: ./jmeter: /usr/lib/jvm/java-8-openjdk
amd64/jre/bin/java/bin/java: not found

I have Java 8 on my system and I have java home set on my system too, but JMeter is not able to get it.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
chirag
  • 11
  • 1
  • 2
  • 1
    See https://stackoverflow.com/questions/24641536/how-to-set-java-home-in-linux-for-all-users – Ori Marko Dec 05 '18 at 06:19
  • 1
    @user7294900 - i have the java home set correctly , but still m unable to launch jmeter – chirag Dec 05 '18 at 06:38
  • what version of jmeter is it ? what is the OS ? type uname -a – UBIK LOAD PACK Dec 05 '18 at 06:40
  • @UBIKLOADPACK - apache-jmeter-5.0 , ubuntu 16.04 – chirag Dec 05 '18 at 06:57
  • Possible duplicate of [How to set JAVA\_HOME in Linux for all users](https://stackoverflow.com/questions/24641536/how-to-set-java-home-in-linux-for-all-users) – GHOST Dec 05 '18 at 07:00
  • @user7294900 thnks ,i was doing a very silly mistake , i had the java verion 1.8 and in java home i have set the path as /usr/lib/jvm/java-8-openjdk-amd64 , just updated it to /usr/lib/jvm/java-1.8.0-openjdk-amd64 and it worked – chirag Dec 05 '18 at 07:17

1 Answers1

3

Try these

1.Open terminal and run

readlink -f $(which java)

OUTPUT:

/usr/lib/jvm/java-8-oracle/jre/bin/java

2.run: echo $JAVA_HOME

OUTPUT:
/usr/lib/jvm/java-8-oracle

3.if you see the path your config is fine if not

use this to setup JAVA_HOME

Don't forget to run source /etc/profile

Note: In the question, you have added

I have java home set on my system to

it has to be JAVA_HOME nothing else

MyTwoCents
  • 7,284
  • 3
  • 24
  • 52
  • It worked i just did one silly mistake i had java version 1.8, and in java home path i mentioned /usr/lib/jvm/java-8-openjdk-amd64, just updated it to /usr/lib/jvm/java-1.8.0-openjdk-amd64 – chirag Dec 05 '18 at 07:21