Because there are two jdk installed on the computer, 1.7 and 1.8. Usually 1.7 is used for development, but when using jmeter, 1.8 sdk needs to be used, so I wonder if it is possible to temporarily modify the jdk environment when starting jmeter. By looking for tutorials on the Internet, I found a way to modify the configuration file of jmeter, and set the jdk to the 1.8 environment when running jmeter. The specific cmd command line is as follows:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
set Path=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%Path%
The running result is shown as:
have to be aware of is:
- This command is only valid for the opened cmd window;
- The command to set the environment variable just prepends the new jdk's, so
set Path=%Path%;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
this doesn't work