停止运行多个实例的 Eclipse/Java
我不是 java 专家或 eclipse 专家.目前我正在做一个项目,我需要经常调试/测试.我使用 Eclipse 运行按钮.但是当我不关闭程序时,eclipse/java 会再次打开它(第二个窗口).这是一个带有 swing jframe 的 gui 应用程序.
I'm not a java expert or a eclipse expert. Currently I'm working on a project and i need to debug/test often. I use the eclipse run Button for it. But when I don't close the Program eclipse/java opens it again(second window). It's an gui app with swing jframe.
eclipse或java中是否有一个函数可以终止之前的构建并在运行时打开新的构建?
Is there a function in eclipse or java to terminate the previous build and opens the new one when you run it?
推荐答案
试试以下方法:
如果您处于调试视角,您可以右键单击正在运行的实例并单击终止并重新启动"(您可以从窗口 -> 首选项 -> 常规 -> 键为此绑定快捷方式)这解决了对我来说很好.
If you are in debug perspective, you can Right click running instance and click "Terminate and Relaunch" (You can bind short-cut for this from Window -> Preferences -> General -> Keys) This worked out well for me.
此链接 表示您可以在任何方面绑定Terminate & Relaunch".你可以试一试,但对我来说同样没有效果.
This link says you can bind "Terminate & Relaunch" in any prespective. You can give it a try but the same did not work out for me.
使用这个插件https://bitbucket.org/mantis78/relaunch-plugin(未尝试).
Use this plugin https://bitbucket.org/mantis78/relaunch-plugin (Not tried).
相关文章