Vert.x with IntelliJ on Windows

If you use Vert.x with IntelliJ, you may have found yourself frequently running jps and taskkill to clear out all of the extraneous io.vertx.core.Launcher processes. I do this every time I re-run my projects—seriously, is it just me?

But I may have just come up with a solution!

If you’re using Gradle, add this new task to your build.gradle file:

Next, edit your run configuration and, in the “Before launch” section, add “Run Gradle task” with your new task before “Build”. Also check the “single instance only” option.

Now anytime you run your project, it will first make sure all those pesky Launchers are gone!