Open balazstbb opened 3 years ago
Currenty dcevm on java17 is supported by Jetbrains runtime.
I try to avoid Jetbrains software much as possible, so as I understand there will be no independent solution? Jetbrains not strong on support other IDE then IntelliJ even if they try to "do" so
There will be dcevm17 with HA in the future.
I'm looking forward to the release of dcevm17.
@skybber unlike zsalab, I don't avoid JetBrains software, what did you mean by that dcevm on java17 is supported by JBR? I've tried to find a JBR with DCEVM but was unable to find one :)
@nvdweem
Look at the release notes and builds page in Confluence:
https://confluence.jetbrains.com/display/JBR/Release+notes+and+builds
Click on a version like this:
https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_12-b11_0_12b1649.1
and scroll down. You'll see DCEVM builds.
Make sure you start your Java VM with: -XX:+AllowEnhancedClassRedefinition
Btw. this build is without HotswapAgent, so not so useful for development of applications based on frameworks like Spring, J2EE etc.
@INPUTsys-Chris, @skybber I did find that page before but unless I'm missing something, jb11 means Java 11 and I don't see a jb17. The java --version
also shows openjdk 11.
@nvdweem I just answered your last sentence "I've tried to find a JBR with DCEVM but was unable to find one :)" You are right, I also found no 17 JBR with DCEVM :)
But if you look at the tags https://github.com/JetBrains/JetBrainsRuntime/tags it seems they are working on it.
Seems that 17 has finally arrived https://github.com/JetBrains/JetBrainsRuntime/releases
Seems that 17 has finally arrived https://github.com/JetBrains/JetBrainsRuntime/releases
Great, but those builds doesn't include HotswapAgent right?
Yes, without agent, I don't expect that HA will be included in JBRs (ever)
Yes, without agent, I don't expect that HA will be included in JBRs (ever)
Is that a deal breaker?
Yes, without agent, I don't expect that HA will be included in JBRs (ever)
Is that a deal breaker?
Would be better if jbrs-runtime has HA, since for j2ee or Spring based apps it is necessary, for Minecraft does not matter.
Btw, there is HA support in jbrs-runtime17, if HA is placed in lib/hotswap/
it will work.
I'm not managing to get HA to work on the Jetbrains runtime. Downloaded jbrsdk_dcevm-17-osx-aarch64-b135.1.tar.gz
. Dropping HA in the lib/hotswap
doesn't seem to do anything. Manually adding it as a -javaagent:[...] will load HA (I'm using 1.4.2-SNAPSHOT release), but when I modify a class, an exception gets thrown and the runtime locks up.
Any ideas?
Did you try -XX:HotswapAgent=fatjar
or -XX:HotswapAgent=core
?
@skybber No I did not and holy crap, it works! Thank you! 😃
I'm still getting an exception logged on each class reload event though:
HOTSWAP AGENT: 15:37:34.299 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception No such field java.beans.Introspector.declaredMethodCache on null.
But initial testing seems to indicate that it's not affecting functionality.
For JetBrains Runtime with DCEVM you need to activate: -XX:+AllowEnhancedClassRedefinition
If the -XX:HotswapAgent=
is used, then -XX:+AllowEnhancedClassRedefinition
is not required
Btw, HA has not been tested on dcevm17 yet, it may or may not work.
Btw, HA has not been tested on dcevm17 yet, it may or may not work.
For some anecdotal evidence, I haven't noticed any issues (apart from that seemingly innocuous exception message I mentioned above) in a couple of hours of development. With the caveat that I've of course only used the plugin related to my own work (WebObjects).
Hi @skybber
What is the proper way to use an external agent, -XX:HotswapAgent=external -javaagent:hotswap-agent-1.4.2-SNAPSHOT.jar
fails with unrecognized VM option. For some reason I cannot directly alter the JVM as it is provisioned by an external tool.
Although I noticed that this flag works AllowEnhancedClassRedefinition
!
-XX:HotswapAgent=external
is suported by dcevm>=11, make sure if you are using dcevm at all since it is working.
Ah I am using the JetBrains runtime 11 variant with DCEVM (jbr_dcevm-11_0_11-osx-x64-b1341.60 in particular), so I am not sure yet if it works. On their runtime.
Does the hotswap agent work with -javaagent:...
and -XX:+AllowEnhancedClassRedefinition
only ?
it's working for me for downloaded version:
lada@skybber ~ $ java -XX:HotswapAgent=external -version
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment JBR-11.0.13.7-1751.19-dcevm (build 11.0.13+7-b1751.19)
Dynamic Code Evolution 64-Bit Server VM JBR-11.0.13.7-1751.19-dcevm (build 11.0.13+7-b1751.19, mixed mode)
@skybber Ha! I needed jbr_dcevm-11_0_11-osx-x64-b1341.60 in particular not the latest. But it seems the HotswapAgent
option is fixed in jbr_dcevm-11_0_13-osx-x64-b1751.19. So I'll stick with AllowEnhancedClassRedefinition
until I can upgrade the JBR.
Many thanks !
I am curious about do you have a plan fro JDK17 as the next LTS? It will come soon (September of 2021), do you have plan for adopt the awesome features for JDK17, if do so do you have a roadmap for it?