1.下載src並解壓
2.獲取所需jar包,編譯
ant download_jarsjava
ant installapache
3.eclipse新建Java Project , [Import] -> [File System] ,導入源碼
4.關閉eclipse,在project目錄下把eclipse.classpath更名爲.classpath;
5.從新打開eclipse,[Run As] -> [Run Configurations]
Arguments->working directory改成${workspace_loc:jmeter/
build}
6.編譯運行, [Run As Java Application]
選擇入口函數 : NewDriver — org.apache.jmete
7.更改源碼,作二次開發eclipse
以調用菜單about爲例,更改src/core/org.apache.jmeter.gui.action.AboutCommand.java函數
在 void about() 函數內添加一行代碼ui
System.out.println("do about()」);spa
![](http://static.javashuo.com/static/loading.gif)
再次編譯運行,點擊菜單about按鈕,查看控制檯輸出3d
![](http://static.javashuo.com/static/loading.gif)