Topic: 错误的提示(NoClassDefFoundError)

  Print this page

1.错误的提示(NoClassDefFoundError) Copy to clipboard
Posted by: lft0083
Posted on: 2006-01-15 16:50

请尽量使用准确的文字描述作为标题
(甚至只是简单的错误信息)
若新帖再無恰当标题,可能会被刪除

不妨先搜寻一下旧帖子 http://www.cjsdn.net/post/search
说不定已找到答案;
例如用keyword: NoClassDefFoundError

如無必要,請勿貼圖,把Command Prompt(命令提示符)上的信息剪貼過來更方便

又,the first character of the classname (and therefore the java file name) should be uppercase by convention, i.e.
public class Ko1_1
and
Ko1_1.java

> javac Ko1_1.java
> java -cp . Ko1_1

原來的标题:
错误的提示


我的java程序如下:
public class ko1_1
{
public static void main(String args[])
{
System.out.println("欢迎来到JAVA世界!!");
}
}
文件名为ko1_1.java
然后在DOS输出如下信息


请问是什么问题?

2.Re:错误的提示 [Re: lft0083] Copy to clipboard
Posted by: neil99
Posted on: 2006-01-15 20:02

编译是
javac ko1_1.java

3.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: lft0083
Posted on: 2006-01-16 11:31

还是不行

4.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: why
Posted on: 2006-01-16 11:49

設置 JAVA_HOME, PATH and CLASSPATH
看看 置顶索引 和 加贴须知
找本基礎入門書或網頁好好依步驟設置閣下第一個java程式

5.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: ranchgirl
Posted on: 2006-01-17 05:46

Read carefully here:

http://bbs.chinajavaworld.com/post/view?bid=20&id=618903&sty=1&tpg=1&age=0

Your problem will be solved!!!

6.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: npwinterboy
Posted on: 2006-01-18 13:25

这种问题一查书马上就知道步骤了

7.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: luoaiweiok
Posted on: 2006-02-08 02:32

这还查鸟啊!这简直是白痴问题,那有在解释后面还加个java的要解释直接java ko1_1不就行了还加个什么java ko1_1.java多此一举

8.Re:错误的提示(NoClassDefFoundError) [Re: luoaiweiok] Copy to clipboard
Posted by: why
Posted on: 2006-02-08 04:18

luoaiweiok wrote:
这还查鸟啊!这简直是白痴问题,那有在解释后面还加个java的要解释直接java ko1_1不就行了还加个什么java ko1_1.java多此一举

白痴?閣下似乎也好不了多少
以後不要再用這樣的字詞

9.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: luoaiweiok
Posted on: 2006-02-09 13:01

不好意思不好意思,那天正在气头上随便看看火气大哈哈

10.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: athlon
Posted on: 2006-02-09 16:47

这种情况是在classpath里面少配置了一个"."当前目录.

11.Re:错误的提示(NoClassDefFoundError) [Re: lft0083] Copy to clipboard
Posted by: luoaiweiok
Posted on: 2006-02-10 00:27

什么少配置啊,你去看他打的代码java ko1_1.java 这本身就是错误的


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923