HotSwap Java code in IntelliJ

Hello,

I’m struggling to find a way to modify java code at runtime.

ATM, my configuration looks like this :
C:\java\jdk\jdk8u345-b01\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:64570,suspend=y,server=n -Daxelor.view.watch=true -javaagent:C:\Users\x\AppData\Local\JetBrains\IntelliJIdea2023.1\groovyHotSwap\gragent.jar -javaagent:C:\Users\x\AppData\Local\JetBrains\IntelliJIdea2023.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\x\AppData\Local\Temp\classpath523376331.jar com.axelor.app.internal.AppRunner --port 8080 --config build\tomcat\axelor-tomcat.properties

In the project, there is the external library hotswap-agent-tomcat-plugin-1.3.0.jar that is supposed to do exactly what I want but dunno how to get it working. I tried to pass arg -javaagent:PATH\TO\JAR\agent.jar

The project is at version 6.1.12 AOS ; 5.4.10 AOP

Anybody ever achieved java hotswap successfully on Axelor app in IntelliJ ?

Let’s talk about this must have feature ! :slight_smile:

To summarize, what i’m trying to do is starting a server from my sources and modify on the fly the body of java methods.

Anybody has ever achieved this ? I’m loosing so much time some day restarting the server (10 minutes to restart on my computer)

PS : IntelliJ ultimate on Windows & java 8 (still on 6.x.x)

Hello! What do you want to achieve ?
Regards

Automatically injecting body method modifications at runtime a.k.a. hotswap.

I am not really sure, I think you can achieve it using Idea ultimate (however it has a cost)