Jmeter4.0 ---- jmeter modify the source code (18)

 

1. Description

jmeter itself is very powerful, but when in use we will find some ideas to help us achieve jmeter not, at this time we need to modify the details of its source code to meet our needs.

* for reference only

 

2. Step

The first step: java decompiler

Java decompiler: Enhanced Class Decompiler3.0.0 (Eclipse Marketplace), this may be from Eclipse comes with the Eclipse Marketplace downloads (reference documentation Address: https://www.cnblogs.com/amyStart/p/5814740.html   )

Specific Instructions:

Open  the Eclipse , Help - the Eclipse Marketplace Client will be able to find

Some eclipse does not have this feature would need to manually add the Eclipse Marketplace Client .

After successfully added, restart the Eclipse , restart open the Preference -> the Java , select Decompiler ( decompiler )

 

 

     

 

 

Step two: modify decompile out of the class content of the document

将需要修改的ApacheJMeter_http(1.jar解压,在eclipse中创建项目,将解压后的内容复制到项目中

Window——Show View——Navigator就能查看到项目下的class文件了 

并对需要修改的class进行修改

 

 

 

     

 

第三步:打新的jar包,进行替换

Class文件根据需求修改完之后,测试通过,将整个文件夹反键点击“Export,选择“JAR file”,作为一个jar导出,名字最好不变。

导出之后替换原来的jar包即可。

 

 

Guess you like

Origin www.cnblogs.com/Z-Queen/p/11245916.html