Comments (37)
There will be.
from dcevm.
Not sure if it counts as it isn't directly from this project, but I noticed that the jetbrains runtime beta versions for jdk17 seem to have dcevm options available, and it seems to work for my use case (Minecraft 1.17 fabric modding).
https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17b135.1
has options with download links jbrsdk_dcevm-17-PLATFORM-bVERSION.tar.gz
, which when using with the VM argument -XX:+AllowEnhancedClassRedefinition
enables alterations to the body of a class.
I haven't run any extensive testing on it to see any limitations or differences from earlier versions of DCEVM, but it seems to work wonderfully.
Double check for a more recent release of the jbr17 betas if you follow those instructions, but otherwise hopefully this helps anyone who needs to use dcevm for java 17.
from dcevm.
@skybber do you have ETA ?
from dcevm.
We have to add it to hotswapagent pages, in the same way how the page http://hotswapagent.org/mydoc_quickstart-jdk11.html is done. Pages sources are at https://github.com/HotswapProjects/HotswapAgentPages, any help will be appreciated.
from dcevm.
Look at https://github.com/JetBrains/JetBrainsRuntime/releases , dcevm17 is embedded in JBR17, there isn't separate dcevm17 build. Enhanced hotswap must be explicitly turned on using -XX:+AllowEnhancedClassRedefinition
from dcevm.
Yes, I'm involved in the project, JB is sponsoring dcevm now.
from dcevm.
It is even used as a default debug enviroment for IntelliJ Idea development in Jetbrains now, it is also able to use it to run profiling tools like YourKit or JFR.
from dcevm.
Class hiearchy is not supported even in Jetbrains version. It has not been supported since dcevm7 and I did not port it to Jetbrains version.
from dcevm.
You have to use either -XX:+AllowEnhancedClassRedefinition
or -XX:HotswapAgent=..
to enable advanced hotswap.
from dcevm.
Probably, worth noticing that the DCEVM is now integrated into the standard Jetbrains Runtime build according to JetBrains/JetBrainsRuntime#134.
Thank you!
from dcevm.
I need to change class hierarchy and add/remove/modify interfaces. Will check the JetBrains. Thanks
from dcevm.
Otherwise, interface addition/removal is supported.
from dcevm.
@skybber Cool, thanks!
Do you know the future of Trava OpenJDK?
Should jbr be used instead?
from dcevm.
Yes, jbr17 is recommended. Currently there is a bug in jbr-dcevm17, that will be fixed in the next release. Also there is an issue with HA, that is not embedded with jbr-runtime. From perspective of application developer using Spring/J2EE etc, HotswapAgent is "must have" feature.
from dcevm.
So, jbr with dcevm effectively cannot be used in the development process - the runtime doesn't support modifications of class signatures? Tried to add a method in an opened debug session both on jbr11 and jbr17 with dcevms with no luck:
Hot Swap failed. dcevm intellij - ...: add method not implemented dcevm intellij ...: Operation not supported by V
from dcevm.
Thanks, works perfectly in both 11 and 17 versions!
Regarding http://hotswapagent.org/ - for me, the solution in general even on supported JDKs (Trava) didn't work. Tried on Hibernate; the implementation relied on Hibernate internals, just stopped working with newer Hibernate releases. Thus, we can't rely on such an unstable solution in a regular development process.
For us, enhanced class redefinition would be more than enough.
from dcevm.
What version of Hibernate are you using? Please create issue at https://github.com/HotswapProjects/HotswapAgent, Otherwise we have tests up to v5.4.14 https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-hibernate-plugin/run-tests.sh
from dcevm.
@skybber, thanks for the quick response.
Unfortunately, used it quite a while ago, so can't tell the exact version.
We plan to migrate to Java17, thus we anyways will have to stick to JBR w/o HotswapAgent support.
from dcevm.
Not sure if it counts as it isn't directly from this project, but I noticed that the jetbrains runtime beta versions for jdk17 seem to have dcevm options available, and it seems to work for my use case (Minecraft 1.17 fabric modding).
https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17b135.1 has options with download links
jbrsdk_dcevm-17-PLATFORM-bVERSION.tar.gz
, which when using with the VM argument-XX:+AllowEnhancedClassRedefinition
enables alterations to the body of a class. I haven't run any extensive testing on it to see any limitations or differences from earlier versions of DCEVM, but it seems to work wonderfully.Double check for a more recent release of the jbr17 betas if you follow those instructions, but otherwise hopefully this helps anyone who needs to use dcevm for java 17.
Minecraft Forge modder here. Unfortunately it doesn't seem that the bootstrap launcher used by Minecraft forge is enjoying the switch to Jbr17. I believe we need these features due to our mods using Mixins and it conflicting with the ability to even hotswap inner method changes.
from dcevm.
Minecraft does not work with jbr17?
from dcevm.
Minecraft does not work with jbr17?
Turns out it was due to the Minecraft forge version, which has recently been updated!
from dcevm.
@skybber you are doing God's work keeping the DCEVM going. It's insane that this isn't baked into the core JVM.
Do you think there will be an "official" jdk 17 release any time soon?
from dcevm.
Dcevm17 is now part of jbr runtime, that is fork of JVM with a lot of enhancements. JB moved to Europe recently, I recommend to look at theirs official statement to current situation.
from dcevm.
Interesting. Is that good news or bad news?
When I look here:
https://github.com/JetBrains/JetBrainsRuntime
I see jdk 11 releases. Can you send me a link to their statement?
Regardless, thank you for keeping this incredibly important project alive!
from dcevm.
If I understand it correctly you can add HotSwapAgent manually to the JBR, so reloading will also work with spring boot and hibernate etc (TravaOpenJDK/trava-jdk-11-dcevm#46) or is this not needed?
from dcevm.
yes, just put HA into lib/hotswap/
, and use -XX:HotswapAgent=fatjar
from dcevm.
That is fantastic I have it working locally. Are you still associated with the project?
from dcevm.
do you know when the dcevm website will be updated with this information?
from dcevm.
And i think the readme here should also be updated to point out the jetbrains replacement.
from dcevm.
Anyway, there are many dcevm fixes in JBR 11/17 now, but it's still not 100% stable, especially the rare case where adding/removing fields is difficult to solve if stack frames contain old instances replaced by scalars. Maybe Oracle is aware of this and that's why they don't include dcevm in the standard hotspot, maybe the reason is completely different - they are working on a solution in Graal, but according to the specs this solution is far from better than dcevm.
from dcevm.
@skybber do you have a github sponsor or similar set up? I'd like to sponsor your DCEVM work.
(Jetbrains recently sponsored me for htmx, and this is far more imporant work than that!)
from dcevm.
Personally I don't have it, there quite a lot of people involved in HA+dcevm, it would be ... selfish to have sponsors just for myself.
from dcevm.
:) Is there a place where you all meet to discuss? If so, and if you don't mind, it would be great to get this work sponsored.
This is an extremely important feature for JVM languages and I'm sure many people in the community would be willing to chip in if there were a single organization to do so through!
from dcevm.
pls. conntact me by an email.
from dcevm.
Confirmed that this works with the jbr. I got tripped up because hotswap-agent.jar is not bundled in as far as I could tell like it used to be. You'll need the hotswap agent plugin for your IDE and then add "-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar" to your VM options. You seem to be able to ignore messages about the plugin not being able to determine the dcevm version.
from dcevm.
Some one from Jetbrains advised -XX:HostswapAgent is not required any more as this is baked into the JBR itself.
https://youtrack.jetbrains.com/issue/JBR-5195/I-sometime-have-my-project-that-is-blocked-from-starting-and-i-have-the-feeling-that-there-is-a-deadlock-somwhere-during-the
@skybber Can you please clarify.
Thank you!
from dcevm.
HotswapAgent is not in JBR, if you need it you can either:
- put
hotswap-aget.jar
it into$JAVA_HOME/lib/hotswap/
and use-XX:HotswapAgent=fatjar
- or use
-XX:HotswapAgent=external -javaagent:<path>/hotswap-agent.jar
from dcevm.
Related Issues (20)
- DCEVM supports AARCH64 planning
- Segfault when redefining classes inside a class transformer HOT 11
- A fatal error has been detected by the Java Runtime Environment
- Running DCEVM-8u181-installer.jar with jdk1.8.0_261 HOT 1
- JBR-17.0.1.12-164.8-dcevm - Fatal error while running HotswapAgent tests HOT 5
- Is it possible to install DCEVM on multiple JDK version HOT 1
- Invalid layout of java.lang.Thread at name
- Build on windows fails because of distro-name.patch
- [Windows10 64] jdk8_u181 decvm Fatal error while runing HotSwapAgent HOT 1
- Questions about Dcevm version And Project start mode
- Hotswap agent not reloading classes
- How to compateble the other openjdk version
- Crashes when retransform classes that are used inside part of the jdk HOT 2
- Does dcevm support C2 compiler HOT 6
- Canot install DCEVM - Linux - Java 17 - NoSuchFileException - no /lib/amd64 directory HOT 1
- Where i can download jdk-8u181? HOT 1
- Open Source Licence HOT 1
- The issue of StackOverflowError caused by conflicts between the dcevm patch and other agents. HOT 3
- Hello! Can you help me provide a JDK 8u345 version?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcevm.