有 JRebel 的开源替代方案吗

2021-01-07 10:00:36 +08:00
 monetto

如题,有类似于 JRebel 的开源替代方案吗? Debug 只能修改方法体,但是不能修改函数类型,参数等...

3514 次点击
所在节点    Java
9 条回复
ImShiYue
2021-01-07 10:07:44 +08:00
别的试过,还没 JRebel 一半好用,付费的就是不一样
tinyuu
2021-01-07 10:11:17 +08:00
http://hotswapagent.org/index.html
> Features
In contrast to standard Java, where the hotswap is limited to in-body code changes, the DCEVM + HotswapAgent allow following code changes:

Add/remove/modify class fields.
Add/remove/modify methods. Add/remove/modify method annotations
Add/remove/modify classes including anonymous classes. HotswapAgent handless correct anonymous class redefinitions.
Add/remove static member of classes. HotswapAgent handles static member initialization.
Add/remove enum values
Refresh framework and application server settings
The only unsupported operation is hierarchy change (change the superclass or remove an interface).

DCEVM realizes hotswap on JVM level. HotwapAgent does the same on level of Java frameworks and servlet containers. Both projects used together forms excellent combination for daily development not only in Java but also in another JVM languages.
monetto
2021-01-07 10:21:00 +08:00
@tinyuu 感谢,但是不支持 JDk6 啊
qwerthhusn
2021-01-07 10:40:51 +08:00
@monetto 卧槽,现在还在用 JDK6
tinyuu
2021-01-07 10:46:43 +08:00
@monetto 哈哈哈 受苦了啊 不行弄个“那啥的 JRebel”
hantsy
2021-01-07 19:14:09 +08:00
完全没兴趣。修改代码后,立即跑测试验证。

不用 Debug,我也不会用。
monetto
2021-01-07 19:16:11 +08:00
@hantsy 公司的某大型项目 JDK6 的,要启动 10 分钟。
hantsy
2021-01-07 19:20:39 +08:00
@monetto JRebel 如果我理解的不错,应该只是开发用的时候用的吧。
oneisall8955
2021-01-07 21:18:30 +08:00
@hantsy #8 不是吧,java 不用 Debug 直接 println ?或许这就是大佬吧

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/742416

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX