TravaOpenJDK / trava-jdk-11-dcevm

dcevm-11 built on Travis
Apache License 2.0
406 stars 56 forks source link

TravaOpenJDK future (JDK17) #46

Open balazstbb opened 3 years ago

balazstbb commented 3 years ago

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?

skybber commented 3 years ago

Currenty dcevm on java17 is supported by Jetbrains runtime.

zsalab commented 3 years ago

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

skybber commented 3 years ago

There will be dcevm17 with HA in the future.

NicklasWallgren commented 3 years ago

I'm looking forward to the release of dcevm17.

nvdweem commented 3 years ago

@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 :)

Chris-SP365 commented 3 years ago

@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

skybber commented 3 years ago

Btw. this build is without HotswapAgent, so not so useful for development of applications based on frameworks like Spring, J2EE etc.

nvdweem commented 3 years ago

@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.

Chris-SP365 commented 3 years ago

@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.

Chris-SP365 commented 3 years ago

Seems that 17 has finally arrived https://github.com/JetBrains/JetBrainsRuntime/releases

NicklasWallgren commented 3 years ago

Seems that 17 has finally arrived https://github.com/JetBrains/JetBrainsRuntime/releases

Great, but those builds doesn't include HotswapAgent right?

skybber commented 3 years ago

Yes, without agent, I don't expect that HA will be included in JBRs (ever)

stephankoelle commented 3 years ago

Yes, without agent, I don't expect that HA will be included in JBRs (ever)

Is that a deal breaker?

skybber commented 3 years ago

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.

skybber commented 3 years ago

Btw, there is HA support in jbrs-runtime17, if HA is placed in lib/hotswap/ it will work.

hugithordarson commented 3 years ago

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?

skybber commented 3 years ago

Did you try -XX:HotswapAgent=fatjar or -XX:HotswapAgent=core ?

hugithordarson commented 3 years ago

@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.

stephankoelle commented 3 years ago

For JetBrains Runtime with DCEVM you need to activate: -XX:+AllowEnhancedClassRedefinition

skybber commented 3 years ago

If the -XX:HotswapAgent= is used, then -XX:+AllowEnhancedClassRedefinition is not required

skybber commented 3 years ago

Btw, HA has not been tested on dcevm17 yet, it may or may not work.

hugithordarson commented 3 years ago

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).

bric3 commented 3 years ago

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 !

skybber commented 3 years ago

-XX:HotswapAgent=external is suported by dcevm>=11, make sure if you are using dcevm at all since it is working.

bric3 commented 3 years ago

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 ?

skybber commented 3 years ago

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)
bric3 commented 3 years ago

@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 !