【发布时间】:2012-05-20 07:34:01
【问题描述】:
我已经安装了 JDK 1.6 版,现在代码已编译但抛出运行时错误
class Console1
{
public static void main(String args[])
{
System.console().readLine("this is how we give he input to the string");
System.out.println("this is what we want to print:0)");
}
}
输出
exception in thread "main" java.lang.NoClassDefFoundError: Console
【问题讨论】:
-
你的类被命名为 Console1,而不是 Console。
-
如何运行代码?从命令行?你输入了什么命令?
-
而不是更改类名它得到相同的错误
-
@buc eclipse , textpad 和命令行
标签: java runtime-error noclassdeffounderror