Intellij中的Tapestry热交换不适用于java类中的更改

时间:2018-01-22 05:32:35

标签: intellij-idea tapestry

在Tapestry(5.0)中,当我尝试重新编译我在java类中的更改时,我会得到一个弹出窗口

Hot Swap Failed
abc.xyz : hierarchy changes not implemented
abc.xyz : Operation not supported by the VM

AFAIK这应该可行,因此我最终重新启动调试会话,这需要相当多的时间。 对此有何帮助?

1 个答案:

答案 0 :(得分:1)

You see this warning, because IntelliJ is failing to hot swap the classes, because, as the message says: VM doesn't support this operation for your changes.

What Tapestry is doing is actually not a hot swap, it's called "Live Class Reloading".

In short: instead of updating existing classes and objects inside VM (what hot swap is doing), Tapestry throws old classes away with all their state, and loads/initialises them again using a custom class loader. It can only do this for its managed classes: page/component/mixin classes and IoC service implementations that are registered using service interface. Everything else can only be reloaded with a hot swap if it's implemented by a VM.

You can read more details about Live Class Reloading in official documentation .