# 前言:系统搭载了jmeter环境,突然就不能用了
1、终端执行:cd /Users/bobo/Documents/apache-jmeter-5.6.2/bin
2、终端执行:sh jmeter
3、运行报错:
Error: VM option 'UseG1GC' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
解决方案:
1、终端执行: cd /Users/bobo/Documents/apache-jmeter-5.6.2/bin vi jmeter
2、按住i键,进入编辑模式将以下代码块注释掉 : "${GC_ALGO:="-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20"}"
点击esc键,输入:wq 退出保存;
3、再次运行jmeter:jmeter -v 完美结局;