且构网

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

Eclipse错误“找不到或加载主类”

更新时间:2022-05-22 05:27:45

如果您面临类似的问题,它与运行配置在Eclipse中无法正常工作。

If you are facing similar problem,it has to do with the "Run Configurations" not working properly in Eclipse.

请在您的java类中包含主要方法。转到运行方式 - >运行配置并放置正确的参数。项目应该是包含主类的项目,主类应该是符合条件的类名。请看下面的快照,以了解清楚。它应该是正常的。然而,您正在创建一个运行配置,您可以使用保存的配置以供以后使用。

Please right clik on your java class containing the main method .Go to Run As-> Run Configurations and put the correct patrameters.Project should be the Project which contains the main class and Main class should be fuly qualified class name.See the snapshots below for clarity.It should wok fine then.Basically,you are creating a Run configuration and you can use that saved configuration for later use also.