这是原因!!!

thewader 2003-07-03 01:49:19
我的sdk是1.4.3 rc版本,
远程序是最简单的helloworld.java如下:
public class HelloWorld
{
public static void main ()
{
System.out.println("We will not use 'hello world!'");
}
}
javac可以通过,但就是java不通不过.
错误的信息是:
Exception in thread "main" java.lang.NoSuchMethodError: main
...全文
93 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zuoyangguang 2003-07-03
  • 打赏
  • 举报
回复
可以接帖了
javabandit 2003-07-03
  • 打赏
  • 举报
回复
不要忘记了最基本的写法,main方法掉了参数!
public class HelloWorld
{
public static void main (String args[])
{
System.out.println("We will not use 'hello world!'");
}
}
wolfsquare 2003-07-03
  • 打赏
  • 举报
回复
楼上正解.
geyf 2003-07-03
  • 打赏
  • 举报
回复
public class HelloWorld
{
public static void main(String[] args) { //注意括号里的
{
System.out.println("We will not use 'hello world!'");
}
}
moumouren 2003-07-03
  • 打赏
  • 举报
回复
up
unsalted 2003-07-03
  • 打赏
  • 举报
回复
在classpath里加入当前路径“.;”。

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧