TravaOpenJDK11 - HotSwapAgent - DCEVM installation not found
Asked Answered
G

1

7

I'm trying to use the HotSwapAgent plugin in IntelliJ. So, I have set as "agent path" the path of hotswap-agent.jar (found in the Trava Open JDK folder) that I downloaded from here. But as you can see here, I get the following error:

DCEVM installation not found for JDK specified for the current project. You should download and install it.

However, the download link redirects here, where there are installers only up to version 8 (which seems reasonable to me since the Trava Open JDK 11 I'm trying to use is already patched and includes its own agent.

So, what am I missing here?

Giefer answered 16/12, 2022 at 20:6 Comment(2)
What IDE version do you use?Edgell
@Edgell thank you very much for the answer. I am using version 2022.3.Giefer
B
10

Well, the version you mention does not require the use of the HotSwapAgent plugin or of any other plugin.

What you have to do is define the folder dcevm-11.0.15+1 as JDK and put the following argument in the VM options of your project's debug configuration, in IntelliJ:

-XX:HotswapAgent=fatjar

or

-XX:HotswapAgent=core

In fatjar mode all plugins will be available. In core mode only core JVM plugins will be available.

Biography answered 16/12, 2022 at 20:33 Comment(3)
Thank you very much for the answer. I used the vm option and it worked! But now I get this error: HOTSWAP AGENT: 22:28:08.750 ERROR (org.hotswap.agent.annotation.handler.PluginClassFileTransformer) - InvocationTargetException in transform method on plugin 'class org.hotswap.agent.plugin.log4j2.Log4j2Plugin' class 'org/apache/logging/log4j/core/LoggerContext'.Giefer
It's hard to guess why HotSwap Agent doesn't like your Log4j plugin (CVE-2021-44228 has entered the chat) without having access to your project and configuration. It is, however, easy to disable it using the following argument: -XX:HotswapAgent=external -javaagent:"<dcevm-path>\lib\hotswap\hotswap-agent.jar=disablePlugin=Log4j2".Biography
Haha thank you once again. It worked!!!Giefer

© 2022 - 2024 — McMap. All rights reserved.