Eclipse:实时编辑和运行代码
在 Eclipse 中编辑 Java 代码时,我可以在代码运行时以各种方式修改代码,并使这些更改生效,而无需重新启动程序。
该功能背后的技术是什么?它是 Eclipse 的一部分,还是可以使用命令行工具和 JDK 附带的工具来完成?
When editing Java code in Eclipse I can modify the code while it's running in various ways and have those changes take effect without restarting my program.
What is the technology underlying this feature? Is it part of Eclipse, or is it something I can do with the command line tools and the tools that come with the JDK?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它是 JVM 的一部分,称为 HotSwap。
http://download.oracle.com/javase/1.4 .2/docs/guide/jpda/enhancements.html
Its part of the JVM and its called HotSwap.
http://download.oracle.com/javase/1.4.2/docs/guide/jpda/enhancements.html
此功能通常称为“热代码替换”,并且是 在 Java 1.4 中引入 - 它是 Java 虚拟机调试接口和各种 API 的一部分。
所以它不是 Eclipse 特有的,但我认为 JDK 附带的任何命令行工具都不支持它。
This feature is usually called "hot code replace" and was introduced in Java 1.4 - it's part of the Java Virtual Machine Debug Interface and various APIs on top of that.
So it's not specific to Eclipse, but I don't think any of the command line tools that come with the JDK support it.