Eclipse运行以前的程序 [英] Eclipse running previous program

查看:289
本文介绍了Eclipse运行以前的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个新的问题。我复制粘贴一个程序,并尝试在eclipse中运行它。但日食继续运行一个较旧的程序。我不知道发生了什么。 (我保存程序作为互联网上的人建议)在运行按钮,只有旧程序。所以我进入运行配置选项,双击java应用程序选项,不知何故我现在正在工作的一个现在出现。我可以编译并运行当前的一个。所以在技术上我解决了这个问题,但是我想解释一下,发生了什么?



解决方案

这里发生的是Eclipse如何决定在按运行按钮。我的怀疑是你有设置导致它启动上次启动的项目,而不是没有启动配置的新功能。如果您将鼠标悬停在 Run 图标上,它将显示Eclipse将启动的启动配置的名称。



对于一个新的程序,你想做一个运行方式 - > Java应用程序(从执行菜单)。



要配置默认启动行为,请参阅首选项 - > 运行/调试 - > 启动,然后在启动操作中设置所需的选项组。




It is a new problem. I copy paste a program and try to run it in eclipse. But the eclipse keeps running an older program. I have no idea what is going on. ( I saved the program as someone on the internet suggested) In the run button, there are only old programs. So I goes into the run configuration option and double clicked the java application option and somehow the one I am working on right now appeared. And I am able to compile and run the current one. So technically I solved the problem, but I would like an explanation, what was going on?

解决方案

What is going on here is how Eclipse decides what to Run when you press the Run button. My suspicion is you have settings which are causing it to launch the last launched item, rather than something new that does not have a launch configuration. If you hover over the Run icon, it will show the name of the launch configuration that Eclipse will launch.

For a new program, you want to do a Run As -> Java Application (From Run menu).

To configure the default launching behaviour, see Preferences -> Run/Debug -> Launching, and then set the options you want in the Launch Operation group.

这篇关于Eclipse运行以前的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆