JMeter Source Code in IntelliJ IDEA 2016

I’ve recently switched to using JetBrains’ IntelliJ IDEA and I wanted to get the JMeter source code working to contribute some bug fixes to the JMeter project.


These are the steps for IntelliJ IDEA 15 (but should work for 2016.x):

  1. Import project from Git:
  2. Select “Create project from existing sources”
  3. Name the project
  4. Select all source file directories
  5. Deselect any libraries, (we will add them later)
  6. Select all of the discovered modules IntelliJ Modules
  7. Select the SDK (you’ll need to add one if you’ve not used IntelliJ before)
  8. Press Next and then Finish
  9. Click the “Ant Build” menu in IntelliJ Ant Build - JMeter
  10. Press add and add the build.xml file
  11. Run the download_jars target
  12. Open project settings (Ctrl+Alt+Shift+S) then add the downloaded jars to the project: Add Jmeter Libraries to IntelliJ
  13. The finished project should look something like this: IntelliJ Finished project
  14. You can compile and start the GUI by executing the run_gui ant target
  15. If there are any errors in IntelliJ when viewing files (or pressing build project) you can usually solve them by pressing alt+enter on the offending code and making the appropriate ‘module’ a dependency - however this shouldn’t stop you developing or running things via ant.

I’ve created a screencast of the above steps to import JMeter source into IntelliJ

if you prefer a visual format.