简体   繁体   English

Eclipse错误:无法找到或加载主类

[英]Eclipse Error: Could not find or load main class

I have an Interface class checked out from an svn project, and created an Interface_Tester class to preview the interface. 我从svn项目中签出了一个Interface_Tester类,并创建了一个Interface_Tester类来预览该接口。 However, when I try to run it in Eclipse I get the following error: 但是,当我尝试在Eclipse中运行它时,出现以下错误:

Error: Could not find or load main class Interface_Tester 错误:找不到或加载主类Interface_Tester

Here is the code from the interface_tester class - 这是interface_tester类的代码-

public class Interface_Tester {
    public static void main(String[] args){
        Interface test = new Interface();
    }
}

I have seen a similar question asked on here but did not understand the answer. 我在这里看到了类似的问题,但不明白答案。 I need a step-by-step guide to the solution as I am a beginner. 作为初学者,我需要有关该解决方案的逐步指南。 Thank you 谢谢

UPDATE: I tried running the Interface class itself and had the same error... All classes are being shown in the project explorer on the left so why is eclipse unable to locate any of them? 更新:我尝试运行Interface类本身,并且遇到相同的错误...所有类都在左侧的项目浏览器中显示,为什么eclipse找不到它们中的任何一个?

On the left side of Eclipse you have a project view. 在Eclipse的左侧,您有一个项目视图。 Try right-clicking your Interface_Tester from there and in a dropdown choose run. 尝试从此处右键单击Interface_Tester,然后在下拉列表中选择运行。 May be you you are trying to run something else 可能是您正在尝试运行其他内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM