Topic: 出错信息,请高人帮我解释,多谢!!! (NoClassDefFoundError)

  Print this page

1.出错信息,请高人帮我解释,多谢!!! (NoClassDefFoundError) Copy to clipboard
Posted by: gaojihui
Posted on: 2005-03-27 23:10

请尽量用准确的文字描述作为标题 !!

do a search before you post a question
NoClassDefFoundError is a vvvvvvvvery common problem for newbies.



出错信息,请高人帮我解释,
源程序
import java.io.*;
public class myjava
{
public static void main(String args[])
{
System.out.println("hello");
}
}
系统环境变量
classpath C:\j2sdk1.4.2_07\lib\tools.jar;C:\j2sdk1.4.2_07\lib\dt.jar
java_home C:\j2sdk1.4.2_07
path C:\j2sdk1.4.2_07\bin
出错提示

2.Re:出错信息,请高人帮我解释,多谢!!! [Re: gaojihui] Copy to clipboard
Posted by: Jove
Posted on: 2005-03-27 23:11

java -cp . myjava


classpath .;C:\j2sdk1.4.2_07\lib\tools.jar;C:\j2sdk1.4.2_07\lib\dt.jar

3.Re:出错信息,请高人帮我解释,多谢!!! [Re: gaojihui] Copy to clipboard
Posted by: 孤独王子
Posted on: 2005-03-27 23:32

现在的初学者怎么都这么不细心?????

4.Re:出错信息,请高人帮我解释,多谢!!! (NoClassDefFoundError) [Re: gaojihui] Copy to clipboard
Posted by: xiadf
Posted on: 2005-04-02 18:17

你的java没有编译成class文件,java命令运行的文件是class文件
要用以下命令:

javac myjava.java

java myjava.class

5.Re:出错信息,请高人帮我解释,多谢!!! (NoClassDefFoundError) [Re: gaojihui] Copy to clipboard
Posted by: java开发
Posted on: 2005-04-03 18:37

得先用JAVAC编译再用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