Eclipse Unable to Launch,选择无法启动,最近没有启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13786517/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:27:28  来源:igfitidea点击:

Eclipse Unable to Launch, the selection cannot be launched, and there are no recent launches

eclipsesvn

提问by Devid

I am getting the above error when i try to launch a Project which i checked out from SVN Repository. When i make my own Java Project on eclipse with a main class everything works fine, but when i try to run the main class from my repository project i get the above message.

当我尝试启动从 SVN 存储库检出的项目时,出现上述错误。当我使用主类在 Eclipse 上创建自己的 Java 项目时,一切正常,但是当我尝试从我的存储库项目中运行主类时,我收到上述消息。

I did not have such a problem before. Repository projects were running fine, i got suddenly this error yesterday and after searching the internet i still can't fix it.

我以前没有这样的问题。存储库项目运行良好,昨天我突然收到这个错误,在网上搜索后我仍然无法修复它。

I have now 3 Projects on eclipse, homewhich is a java project made by me and two projects from repository lechand kramerspitz.

我现在在 eclipse 上有 3 个项目,home这是一个由我制作的 java 项目和来自存储库lechkramerspitz 的两个项目。

Under Run-> Run Configuration->Java Application->Project Browse i see only the home Project which i made, although the two other repository projects are also in my workspace but they don't show up. (Run As is empty)

在“运行”->“运行配置”->“Java 应用程序”->“项目浏览”下,我只看到我创建的主项目,尽管其他两个存储库项目也在我的工作区中,但它们没有显示出来。(运行方式为空)

Does anyone know what i should do? Re-installing Eclipse does not help, cause the problem remains.

有谁知道我应该做什么?重新安装 Eclipse 没有帮助,导致问题仍然存在。

The only difference i see is that the two repository projects are missing a .classpath file. Please help!

我看到的唯一区别是两个存储库项目缺少一个 .classpath 文件。请帮忙!

Hear are some pics: eclipseRun ConfigurationProject Selectionworkspacehome Project made by mekramerspitz repository project (cannot run main)reversi repository project (cannot run main method)

听到一些图片: 蚀运行配置项目选择工作空间home 我做的项目kramerspitz 存储库项目(无法运行 main)黑白棋存储库项目(无法运行 main 方法)

采纳答案by Devid

As it seems I can't just check out on the project from the SVN repository. I have to choose from the project a specific project to check out, then everything works fine.

看来我不能只是从 SVN 存储库中查看该项目。我必须从项目中选择一个特定的项目来检查,然后一切正常。

回答by user3358337

I Windows 8 and run Eclipse C++ Kepler (Toolchain = MinGW). This is what I did for the same message that you got and it worked for me: In editor's screen, right-click>Run As>Local C/C++ Application

我在 Windows 8 上运行 Eclipse C++ Kepler(工具链 = MinGW)。这就是我对您收到的相同消息所做的操作,它对我有用:在编辑器屏幕中,右键单击>运行方式>本地 C/C++ 应用程序

回答by Pritesh

Same problem find solution using

同样的问题找到解决方案使用

Run >> Run Configuration >> Android Application >>Under Project ....Select Brows Button to select appropriate project

运行>>运行配置>>Android应用>>在项目下....选择浏览按钮来选择合适的项目

now project run successfully

现在项目运行成功

Thanks....

谢谢....

回答by Guan

public class HelloWorld {
    public void main(String[] args) {
        System.out.printf("Hello world!!!");
    }
}

Also if you omit the statickeyword, the problem happens.

此外,如果您省略static关键字,问题就会发生。

回答by s.n

Sometimes it happens when you forget to write "String[] args" in the main parenthesis

有时当您忘记在主括号中写入“String[] args”时会发生这种情况

public class Hello {
    public static void main(){
        System.out.println("Hello");
    }
}

Code above would cause a similar problem

上面的代码会导致类似的问题