当前位置: 技术问答>java相关
我刚学Java,用Javac编译一个例程没问题,但一用Java运行就出错:Exception in the thread "main" java.lang.NoClassDefFoundError: Welcome
来源: 互联网 发布时间:2014-12-22
本文导语: 我刚学Java,用Javac编译一个例程没问题,但一用Java运行就出错:Exception in the thread "main" java.lang.NoClassDefFoundError: Welcome 例程如下: /** * @version 1.10 10 Mar 1997 * @author Cay Horstmann */ public class Welcome { publ...
我刚学Java,用Javac编译一个例程没问题,但一用Java运行就出错:Exception in the thread "main" java.lang.NoClassDefFoundError: Welcome
例程如下:
/**
* @version 1.10 10 Mar 1997
* @author Cay Horstmann
*/
public class Welcome
{ public static void main(String[] args)
{ String[] greeting = new String[3];
greeting[0] = "Welcome to Core Java";
greeting[1] = "by Cay Horstmann";
greeting[2] = "and Gary Cornell";
int i;
for (i = 0; i
例程如下:
/**
* @version 1.10 10 Mar 1997
* @author Cay Horstmann
*/
public class Welcome
{ public static void main(String[] args)
{ String[] greeting = new String[3];
greeting[0] = "Welcome to Core Java";
greeting[1] = "by Cay Horstmann";
greeting[2] = "and Gary Cornell";
int i;
for (i = 0; i