且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Eclipse Java错误:此选择无法启动,最近没有启动

更新时间:2023-01-14 19:18:13

Eclipse需要在项目的一个源文件中看到一个主要方法,以确定它是什么样的项目它可以提供正确的运行选项:

  public static void main(String [] args)

如果没有该方法签名(或该方法签名的格式不正确的版本),则运行方式菜单项不会显示任何运行选项。


I have looked everywhere on the internet and tried everything the forums say to do and nothing works. This error keeps coming up. I have tried running my java project (not for android) even the drop down run as button doesn't work because it says "none applicable".

Eclipse needs to see a main method in one of your project's source files in order to determine what kind of project it is so that it can offer the proper run options:

public static void main(String[] args)

Without that method signature (or with a malformed version of that method signature), the Run As menu item will not present any run options.