[Solved] JMeter startup error: integer expression expected

After installing jmeter, the following error message appears during the process of starting Jmeter (mostly due to incorrect configuration).

/usr/local/Cellar/jmeter/5.1.1/libexec/bin/jmeter: line 128: [: : integer expression expected

/usr/local/Cellar/jmeter/5.1.1/libexec/bin/jmeter: line 192: /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java: No such file or directory

The information on the Internet indicates that my jdk version is not correct

1. Check the version of jdk on the local machine with the following command.

/usr/libexec/java_home -V

 

The input gave me an electric jdk version like:

The wrong jdk version is: jdk1.8.0_181

 

2, open.bash_profilefile to process, enter as follows:

vim .bash_profile

After opening the file, it is convenient to click the letter I for editing. After editing, press ESC to launch the editing mode, enter: WQ, exit, and then enter the following command on the terminal to really take effect

source ~/.bash_profile

After modification, execute at the terminal:

sudo sh jmeter

And then it started!

Now, I hope you have all the help

Similar Posts: