Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TravaOpenJDK future (JDK17) #46

Open
balazstbb opened this issue May 12, 2021 · 27 comments
Open

TravaOpenJDK future (JDK17) #46

balazstbb opened this issue May 12, 2021 · 27 comments

Comments

@balazstbb
Copy link

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?

@balazstbb balazstbb changed the title TravaOpenJDK future TravaOpenJDK future (JDK17) May 12, 2021
@skybber
Copy link
Contributor

skybber commented May 12, 2021

Currenty dcevm on java17 is supported by Jetbrains runtime.

@zsalab
Copy link

zsalab commented May 12, 2021

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 skybber reopened this Jul 5, 2021
@skybber
Copy link
Contributor

skybber commented Jul 5, 2021

There will be dcevm17 with HA in the future.

@NicklasWallgren
Copy link

NicklasWallgren commented Sep 12, 2021

I'm looking forward to the release of dcevm17.

@nvdweem
Copy link

nvdweem commented Sep 24, 2021

@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
Copy link

@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
Copy link
Contributor

skybber commented Sep 24, 2021

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

@nvdweem
Copy link

nvdweem commented Sep 24, 2021

@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
Copy link

@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
Copy link

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

@NicklasWallgren
Copy link

NicklasWallgren commented Sep 24, 2021

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

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

@skybber
Copy link
Contributor

skybber commented Sep 24, 2021

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

@stephankoelle
Copy link

stephankoelle commented Oct 8, 2021

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

Is that a deal breaker?

@skybber
Copy link
Contributor

skybber commented Oct 8, 2021

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
Copy link
Contributor

skybber commented Oct 8, 2021

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

@hugithordarson
Copy link

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
Copy link
Contributor

skybber commented Nov 5, 2021

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

@hugithordarson
Copy link

hugithordarson commented Nov 5, 2021

@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
Copy link

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

@skybber
Copy link
Contributor

skybber commented Nov 5, 2021

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

@skybber
Copy link
Contributor

skybber commented Nov 5, 2021

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

@hugithordarson
Copy link

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
Copy link

bric3 commented Nov 30, 2021

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
Copy link
Contributor

skybber commented Nov 30, 2021

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

@bric3
Copy link

bric3 commented Nov 30, 2021

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
Copy link
Contributor

skybber commented Nov 30, 2021

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
Copy link

bric3 commented Dec 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants