[英]Could not find or load main class
I already searched for this answer and I keep on seeing change your "PATH" but I don't know how to go about doing that. 我已经搜索了这个答案,并且一直看到更改您的“ PATH”,但是我不知道该怎么做。 I'm just trying to run this simple code:
我只是尝试运行以下简单代码:
package eclipsePackage;
public class TutorialClass {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello World");
}
}
Can someone explain to me thoroughly please. 有人可以向我详细解释。 I'm using eclipse and java jre1.8.0_40
我正在使用eclipse和java jre1.8.0_40
我敢打赌,您没有在Eclipse中设置“自动构建”选项,因此当您尝试启动应用程序时,没有任何编译
I don't see anything from the way your code is laid out. 从您的代码布局方式上看不到任何东西。 Move your java class (without the package statement) into a folder on your C:drive and try running it from the command line.
将Java类(不带package语句)移到C:drive上的文件夹中,然后尝试从命令行运行它。 If it works there, then there's probably an issue with your ide.
如果它在那里工作,那么您的想法可能存在问题。 If that's the case, reinstall your ide or revert to the default settings.
如果是这种情况,请重新安装您的ide或恢复为默认设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.