Interview Questions

I have set the CLASSPATH, but JMeter is not picking up my Jars

Apache JMeter FAQ


(Continued from previous question...)

I have set the CLASSPATH, but JMeter is not picking up my Jars

Answer:The CLASSPATH variable is ignored when using the -jar flag. For some further information on this, see:How the Java launcher finds user classes

JMeter currently knows to look for jars/classes in two places only:
*
lib/ext, where the ApacheJMeter_*.jar files live
* lib, where the 3rd party jar files live


Additional jars should normally be placed in the lib directory; however, if you have written an add-on for JMeter itself, that should be put in the lib/ext directory.

If you want your jar file to be available to all Java applications, it can be placed in the JVM extensions directory

Another possible solution is to take a copy of the jmeter startup script, and replace: -jar ["ApacheJMeter"].jar with org.apache.jmeter.NewDriver after adding ApacheJMeter.jar to the classpath

(Continued on next question...)

Other Interview Questions