JAVAEclipse:could not find the main class,program will exit!

简介:

JAVAEclipse:could not find the main class,program will exit!

遇到这个错误主要是当前的工程的jdkeclipse的版本配置不匹配造成的,修改方法如下:

在当前工程点右键选择Properties->Java Compiler->选中Enable project specific settings->JDK Compliance中的Compiler compliance level:改为1.5或者1.4就可以了。


本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/423997,如需转载请自行联系原作者

相关文章
|
Java Maven Spring
|
5月前
|
数据库 Python
Traceback(most recent call last):File "main.py", line 4l,in<module>alueError: sleep length must be n
Traceback(most recent call last):File "main.py", line 4l,in<module>alueError: sleep length must be n
|
9月前
Could not find method debug()
Could not find method debug()
273 59
为什么要写 __name__ == “__main__”
if __name__ == "__main__" 模式在Python中用于区分模块是被直接运行还是被导入。通过这种模式,可以编写既可以作为独立脚本运行又可以作为模块导入的代码,从而提高代码的重用性和可维护性。
|
7月前
|
Python
Cannot find reference ‘args‘ in ‘__init__.pyi‘ ,request要写对
Cannot find reference ‘args‘ in ‘__init__.pyi‘ ,request要写对
|
9月前
|
Go
Error: Package awesomeProject contains more than one main function Consider using File kind instead
Goland编辑器运行时出现“edit configuration”窗口,阻碍代码执行。解决方法:右键点击源文件运行。问题源于Go语言不支持函数重载,同一包内不能有两个同名函数,导致多入口冲突。初学者在main包中使用了多个Go源文件,应改为仅有一个源码文件来避免此问题。
86 0
|
Java
Java Error: The public type HelloWorld must be defined in its own file
Java Error: The public type HelloWorld must be defined in its own file
207 0
|
Linux
编译OpenJDK8:error: control reaches end of non-void function [-Werror=return-type]
编译OpenJDK8:error: control reaches end of non-void function [-Werror=return-type]
207 0
|
Java
2022-07-15 17:47:32.079 ERROR 10280 --- [ main] o.s.b.d.LoggingFailureAnalys错误解决方法
2022-07-15 17:47:32.079 ERROR 10280 --- [ main] o.s.b.d.LoggingFailureAnalys错误解决方法
397 0

热门文章

最新文章