用jdk1.2执行java程序,javac通过了,但java总是执行不了,是因为什么?(错误提示为——Exception in thread "main" java.lang.NoClassDefFoundError:Helloworld/class)

lhcyf 2001-05-26 05:08:00
...全文
272 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lugonix 2001-05-27
  • 打赏
  • 举报
回复
没有找到正确的class文件嘛!注意大小写嘛!
freespider 2001-05-27
  • 打赏
  • 举报
回复
to:darling(雪儿)
谢谢指教
to:other
谢谢

今天是我第二天学习java,我要多多努力,愿多向大家学习。
backlove 2001-05-27
  • 打赏
  • 举报
回复
faint
feelingfly 2001-05-27
  • 打赏
  • 举报
回复
java -cp . Helloworld
注意大小写,敏感的
servletboy 2001-05-27
  • 打赏
  • 举报
回复
下载一个开发环境软件吧,不用再打命令,又可解决你的问题。
http://www.jcreator.com/
免费的
feelyou 2001-05-27
  • 打赏
  • 举报
回复
NOTICE: when you run a java class, do not use "java Hello.class", instead, use "java Hello". Because "." is expained as package separater.
How is a java class called? first the jvm search the classpath, then the codebase, just like when running a program in dos it search the path. then, it add the package to the classpath or codebase and invoke the class. for example:
current classpath set to d:\java, and the command-line like "java examples.test.TestJava", the package sentence in your TestJava.java should be:
package examples.test;
and there should be a dir structure like this:
d:\java\examples\testand your TestJava.java and TestJava.class should be in this dir.
ejar 2001-05-26
  • 打赏
  • 举报
回复
有时候可能安装过程出现错误,或路径设置有问题,不妨看看
houguojun 2001-05-26
  • 打赏
  • 举报
回复
CLASSPATH中有.吗?
darling 2001-05-26
  • 打赏
  • 举报
回复
to: freespider()
java 是区分大小写的,一定要注意啊.
freespider 2001-05-26
  • 打赏
  • 举报
回复
我解决了
我输入 java hello
得到和你一样的错误

若输入 java Hello
就正确了,好奇怪哦!!!

lhcyf 你也初学java吗?
共同进步吧,freespider@21cn.com,
freespider 2001-05-26
  • 打赏
  • 举报
回复
和我的问题一样,
楼上那位请说清楚一点好吗,我今天才开始学java啊,
不要让我受到打击
mazalet 2001-05-26
  • 打赏
  • 举报
回复
main function error,please note up/locase

62,628

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧