我的代码:
public class hello
{
public static void main(String[] args)
{
System.out.println("hello\r\n");
}
}
报错:
Editor does not contain a main type.
请问这是什么原因?
在eclipse中运行helloworld报错!!
-
- 帖子: 45
- 注册时间: 2007-07-08 15:24
-
- 帖子: 38
- 注册时间: 2008-10-15 17:20
Re: 在eclipse中运行helloworld报错!!
在你的代码中,看不到错误。
-
- 帖子: 13
- 注册时间: 2008-11-07 23:56
Re: 在eclipse中运行helloworld报错!!
你的jdk环境变量没有设置好
-
- 帖子: 13
- 注册时间: 2008-11-07 23:56
Re: 在eclipse中运行helloworld报错!!
在win里面遇到过
-
- 帖子: 20
- 注册时间: 2008-11-08 21:28
Re: 在eclipse中运行helloworld报错!!
命名规范..
类首字母大写.
这报的错是你把main当一个类型使用了,系统找不到
学学英语,谢谢.
写程序前先知道命名规范.否则别人很难读懂.
类首字母大写.
这报的错是你把main当一个类型使用了,系统找不到
学学英语,谢谢.
写程序前先知道命名规范.否则别人很难读懂.
-
- 帖子: 29
- 注册时间: 2008-10-18 23:44
Re: 在eclipse中运行helloworld报错!!
main 其实还是用C风格去写好一些,放在类里感觉有点不伦不类
-
- 帖子: 2
- 注册时间: 2008-12-03 16:22
Re: 在eclipse中运行helloworld报错!!
放在类里的好处是一个项目可以有多个maindbzllx 写了:main 其实还是用C风格去写好一些,放在类里感觉有点不伦不类