我在这个位置打开了一个cmd窗口:
C:\...\apache-jmeter-2.13\lib\ext
并运行此命令C:\...\apache-jmeter-2.13\lib\ext>java -jar cmdrunner-2.0.jar --tool Reporter --generate-png test.png --input-jtl C:\...\...\Desktop\jmeter\..\reports\
jpGCgraphs.jtl --plugin-type ResponseTimesOverTimeGui --width 800 --height 600
错误:
ERROR: java.lang.IllegalArgumentException: Tool class Reporter not found
*** Problem's technical details go below ***
Home directory was detected as: E:\dumps\apache-jmeter-2.13\lib\ext
Exception in thread "main" java.lang.IllegalArgumentException: Tool class Reporter not found
at kg.apc.cmdtools.PluginsCMD.getToolInstance(PluginsCMD.java:123)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:53)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:105)
我在这里指的是解决方案:http://jmeter.512774.n5.nabble.com/Unable-to-execute-JMeterPluginsCMD-Command-Line-Tool-td5681583.html
我在文件夹中都有必需的jar:cmdrunner-2.0.jar
和JMeterPlugins-Extras.jar
答案 0 :(得分:2)
确保jmeter-plugins-standard.jar
E:\dumps\apache-jmeter-2.13\lib\ext folder
答案 1 :(得分:0)
就我而言,使用插件管理器安装“命令行图绘图工具”后,问题已解决。
答案 2 :(得分:-1)
jar文件的位置无关紧要,jar文件必须在执行命令的类路径中
因此需要额外的参数
窗
-cp "cmdrunner-2.0.jar;JMeterPlugins-Extras.jar"
Linux
-cp "cmdrunner-2.0.jar:JMeterPlugins-Extras.jar"
另外在帖子中他们说他们已经添加了jmeter home也添加到类路径但是在这里我没看到
因此-cp "C:/pathto/jmeter/home/bin/*.*;cmdrunner-2.0.jar;JMeterPlugins-Extras.jar"
错误消息是说“main”java.lang.IllegalArgumentException:未找到工具类Reporter,表示在类路径中找不到该类。请参考包含上述类的确切jar文件。我假设“Reporter”类在上面的两个罐中可用,因此我添加到-cp“cmdrunner-2.0.jar; JMeterPlugins-Extras.jar”,否则相应地更改为正确的jar。
现在整个命令看起来
C:\...\apache-jmeter-2.13\lib\ext>java -jar cmdrunner-2.0.jar --tool Reporter --generate-png test.png --input-jtl C:\...\...\Desktop\jmeter\..\reports\
jpGCgraphs.jtl --plugin-type ResponseTimesOverTimeGui --width 800 --height 600 -cp "cmdrunner-2.0.jar;JMeterPlugins-Extras.jar"
希望这有帮助..请提供您的发现。如果这有助于不要忘记点击回答。