Topic: 初学者求救(dos下能编译,不能运行) |
Print this page |
1.初学者求救(dos下能编译,不能运行) | Copy to clipboard |
Posted by: guhu_xin Posted on: 2005-04-02 15:44 输入:d:>javac HellorWorld.java 编译成功(没有任何提示) 再输入:d:>java HellorWorld 显示:Esception in thread "main"java.long.NoClassDefFoundError:HelloWorld 是哪里出错了??????? |
2.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: justforu Posted on: 2005-04-02 16:19 看看我的帖 |
3.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: why Posted on: 2005-04-02 21:18 SET CLASSPATH=. is enough |
4.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: 40303331 Posted on: 2005-04-03 07:10 你的环境变量没设置好吧? |
5.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: guhu_xin Posted on: 2005-04-03 07:58 谢谢各位的支持。 我的环境变量如下设置的:(j2sdk装在c盘) CLASSPATH=C:\j2sdk\lib\dt.jar;C:\j2sdk\lib\tools.jar;C:\j2sdk\bin JAVA_HOME=C:\j2sdk PATH=C:\j2sdk\bin |
6.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: why Posted on: 2005-04-03 09:31 better be SET CLASSPATH=. (search to check and understand what dt.jar and tools.jar are for) SET JAVA_HOME=C:\j2sdk SET PATH=%JAVA_HOME%\bin;%PATH% |
7.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: chenlan5209 Posted on: 2005-04-06 00:32 有可能是你的文件名字和你的类名不一样,把文件名和类名一样应该就没有错误了! |
8.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: 飞飞 Posted on: 2005-06-03 18:45 敢问一下环境变量在哪设啊? |
9.Re:初学者求救(dos下能编译,不能运行) [Re: guhu_xin] | Copy to clipboard |
Posted by: cowone Posted on: 2005-06-03 19:57 设置为.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 |