[英]-Guser.classpath=arhivo.jar not load .jar
I am using JMeter 5.0 mode no GUI and OpenJDK Runtime Environment Corretto-8.322.06.1 (build 1.8.0_322-b06)我正在使用 JMeter 5.0 模式,没有 GUI 和 OpenJDK 运行时环境 Corretto-8.322.06.1 (build 1.8.0_322-b06)
jmeter.bat -f -Ghilos=1 -Gsubida=1 -Gciclo=1 -GDatosCajero=DT_TramasATMPropios.csv -Guser.classpath=trama.jar -n -LERROR -t Cajeros_distribuidos.jmx -l result.csv -Djmeter.save.saveservice.output_format=csv -Ljmeter.engine=DEBUG
error parameter错误参数
-Guser.classpath=file.jar
take parameters globally in jmeter.log在jmeter.log中全局取参数
INFO oajJMeter: Setting Global property: user.classpath=trama.jar
信息 oajJMeter:设置全局属性:user.classpath=trama.jar
error错误
ERROR oajuBeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import Cajeros.RecepcionParametrosCajeros;
错误 oajuBeanShellInterpreter:调用 bsh 方法时出错:eval 源文件:内联评估:``import Cajeros.RecepcionParametrosCajeros; import java.util.concurrent.ThreadLoc.
导入 java.util.concurrent.ThreadLoc。 .
. .
. '': Typed variable declaration: Class: RecepcionParametrosCajeros not found in namespace
'':类型化变量声明:类:在命名空间中找不到 RecepcionParametrosCajeros
property in the non-GUI JMeter command, but it does not take the.jar, when I use the property with非 GUI JMeter 命令中的属性,但是当我将属性与
-Juser.classpath=file.jar
if it takes it, it also takes the rego global variables with -G如果它接受它,它也会接受带 -G 的 rego 全局变量
work globally with -G for distributed testing在全球范围内使用 -G 进行分布式测试
I cannot reproduce your issue using the following dummy simple class:我无法使用以下虚拟简单类重现您的问题:
package Cajeros;
public class RecepcionParametrosCajeros {
public RecepcionParametrosCajeros() {
}
public String foo() {
return "foo";
}
}
importing the jar as:将 jar 导入为:
jmeter -Juser.classpath=trama.jar
and invoking it like:并像这样调用它:
import Cajeros.RecepcionParametrosCajeros;
String foo = new RecepcionParametrosCajeros().foo();
log.info("Got string " + foo);
So double check that the file is present in JMeter's "bin" directory所以仔细检查该文件是否存在于 JMeter 的“bin”目录中
More information:更多信息:
Also be aware of the following recommendations:另请注意以下建议:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.