monetto
V2EX  ›  Java

有 JRebel 的开源替代方案吗

  •  
  •   monetto · Jan 7, 2021 · 5226 views
    This topic created in 2131 days ago, the information mentioned may be changed or developed.

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

    10 replies  •  2024-09-08 21:04:01 +08:00
    ImShiYue
    ImShiYue
    Jan 7, 2021
    1
    别的试过,还没 JRebel 一半好用,付费的就是不一样
    tinyuu
    tinyuu
    Jan 7, 2021❤️1
    2
    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
    monetto
    OP
    Jan 7, 2021 via iPhone
    3
    @tinyuu 感谢,但是不支持 JDk6 啊
    qwerthhusn
    qwerthhusn
    Jan 7, 2021
    4
    @monetto 卧槽,现在还在用 JDK6
    tinyuu
    tinyuu
    Jan 7, 2021
    5
    @monetto 哈哈哈 受苦了啊 不行弄个“那啥的 JRebel”
    hantsy
    hantsy
    Jan 7, 2021
    6
    完全没兴趣。修改代码后,立即跑测试验证。

    不用 Debug,我也不会用。
    monetto
    monetto
    OP
    Jan 7, 2021
    7
    @hantsy 公司的某大型项目 JDK6 的,要启动 10 分钟。
    hantsy
    hantsy
    Jan 7, 2021
    8
    @monetto JRebel 如果我理解的不错,应该只是开发用的时候用的吧。
    itechify
    itechify
    Jan 7, 2021
    9
    @hantsy #8 不是吧,java 不用 Debug 直接 println ?或许这就是大佬吧
    gejun123456
    gejun123456
    Sep 8, 2024
    10
    @monetto #7 本地测试可以用 java8 吗,可以试试 Intellij HotSwaphelper 插件 支持 HotSwapAgent 框架的插件,https://www.bilibili.com/video/BV1cpWUedEbF
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1477 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:50 · PVG 17:50 · LAX 01:50 · JFK 04:50
    ♥ Do have faith in what you're doing.