源码:
public class helloworld
{
public static void main(String[] args)
{
System.out.println("hello, world !");
}
}
编译通过了,怎么就无法运行了呢?在dos下 输入 java helloworld 报错
exception in thread "main" java.lang.NoClassDefFoundError:helloworld我在path和classpath中都设置好了的,怎么还是无法运行啊?
public class helloworld
{
public static void main(String[] args)
{
System.out.println("hello, world !");
}
}
编译通过了,怎么就无法运行了呢?在dos下 输入 java helloworld 报错
exception in thread "main" java.lang.NoClassDefFoundError:helloworld我在path和classpath中都设置好了的,怎么还是无法运行啊?
那是当然的了,你的文件不在你执行的目录下怎么可以啊在classpath 的值前加.;
-----------------------------------------
我怀疑也是这个问题!
没有 "." 就不会在当前目录进行查找。