How to set a hotswap on your Java project in IntelliJ Idea

Let’s take a look at how to speed up the development of our Spring Boot app by installing Trava Open JDK and use of hotswapping.

How to set hotswap with Trava Open JDK in your IntelliJ Idea

  1. Install to your computer Trava Open JDK. You can find installation binaries at Trava Open JDK on GitHub. If you are Windows user, I would give you a tip to just
    download Windows binaries and unpack them to folder where you have the rest of JDKs. Exp. C:/Program files/Java/ .
  2. In IntelliJ Idea go to Project Structure and under Platform Settings add to SDKs Trava Open JDK. Also under Project Settings in Project SDK select Trave Open JDK as JDK for your project.
  3. And as last step change in IntelliJ Spring Boot runner configuration Running Application Update Policies. Change On ‘Update’ action and set it to Update classes and resources and On frame deactivation set the same to Update classes and resources. You can check image below for more details.

IntelliJ runne with hotswapping
And that is all. You can just start your app now and your code will be hotswapped on frame deactivation. Or you can command hotswap manually with ctrl + shift + f9.

This entry was posted in JetBrains suite and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.