3

I downloaded spring-loaded.jar and tried to set it up for IntelliJ but unfortunately it did not work.

So, here is my questions:

1) What needs to be done exactly to set it up? 2) How do I trigger hot-swap?

lschin
  • 6,745
  • 2
  • 38
  • 52
led
  • 611
  • 4
  • 11
  • 18

1 Answers1

2

I think you're looking for the spring-loaded project.

As stated in the official documentation, you have to add this java agent argument in your IntelliJ "run configuration" (the configuration that runs your application - it may be a Java class or a servlet container like Tomcat):

-javaagent:<pathTo>/springloaded-{VERSION}.jar

Once this agent is loaded, it watches *.class files on disk and reloads them if modified (by your IDE, for example).

Warning: depending on your application, and especially if it contains caches, data intialized at startup... you may have to write specific plugins or event listeners to reinitialize those.

Brian Clozel
  • 56,583
  • 15
  • 167
  • 176
  • I get the following error when I run the application within Intellij: Error opening zip file or JAR manifest missing : ~/Downloads/springloaded-1.1.4.jar – led Jan 11 '14 at 17:20
  • I was able to make this work with --no-verify flag on a Windows machine. For some reason I am still running into the same issue on Mac OSX. – led May 10 '14 at 19:44
  • On mac use -noverify – Taras Jan 08 '17 at 20:47