编译通不过呀??急!!!

yjws 2006-03-15 03:58:06
import java.util.*;

public class Property {
public static void main(String[] args) {
System.out.println(new Date());
Properties p = System.getProperties();
p.list(System.out);
System.out.println("--- Memory Usage:");
Runtime rt = Runtime.getRuntime();
System.out.println("Total Memory = "
+ rt.totalMemory()
+ " Free Memory = "
+ rt.freeMemory());
}
}
请各位大吓看一下..怎么回事?????


Exception in thread "main" java.lang.NoClassDefFoundError:Propery
press any key to continue
...全文
144 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
crazycy 2006-03-17
  • 打赏
  • 举报
回复
呵呵,这些基本的错误(尤其代码不多)最好自己多想想,这样收获更大一些,真的
yjws 2006-03-17
  • 打赏
  • 举报
回复
呵..现在用熟悉的JCP 250 这类问题少多了...
gujing01 2006-03-16
  • 打赏
  • 举报
回复
楼主编程也要仔细呀
NKLoveRene 2006-03-16
  • 打赏
  • 举报
回复
Exception in thread "main" java.lang.NoClassDefFoundError:Propery

没写正确啊
使用tab键不就得了么
少了好多麻烦啊
yjws 2006-03-16
  • 打赏
  • 举报
回复
谢谢各位了...这么垃圾的问题...??
yjws 2006-03-16
  • 打赏
  • 举报
回复
我晕.哦..
interpb 2006-03-15
  • 打赏
  • 举报
回复
晕呢
说了楼主 运行的时候写错类名了!
  • 打赏
  • 举报
回复
没出错啊.
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>cd C:\Documents and Settings\Administrat
or\My Documents

C:\Documents and Settings\Administrator\My Documents>javac Property.java

C:\Documents and Settings\Administrator\My Documents>java Property
Wed Mar 15 16:40:53 CST 2006
-- listing properties --
java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
sun.boot.library.path=C:\Program Files\Java\jre1.5.0_06\bin
java.vm.version=1.5.0_06-b05
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.country=CN
sun.os.patch.level=Service Pack 2
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\Documents and Settings\Administrat...
java.runtime.version=1.5.0_06-b05
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files\Java\jre1.5.0_06\lib...
os.arch=x86
java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
line.separator=

java.vm.specification.vendor=Sun Microsystems Inc.
user.variant=
os.name=Windows XP
sun.jnu.encoding=GBK
java.library.path=C:\WINDOWS\system32;.;C:\WINDOWS\syst...
java.specification.name=Java Platform API Specification
java.class.version=49.0
sun.management.compiler=HotSpot Client Compiler
os.version=5.1
user.home=C:\Documents and Settings\Administrator
user.timezone=Asia/Shanghai
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=GBK
java.specification.version=1.5
user.name=Administrator
java.class.path=.;C:\j2sdk1.4.2_04\lib\tools.jav
java.vm.specification.version=1.0
sun.arch.data.model=32
java.home=C:\Program Files\Java\jre1.5.0_06
java.specification.vendor=Sun Microsystems Inc.
user.language=zh
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode, sharing
java.version=1.5.0_06
java.ext.dirs=C:\Program Files\Java\jre1.5.0_06\lib...
sun.boot.class.path=C:\Program Files\Java\jre1.5.0_06\lib...
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.desktop=windows
sun.cpu.isalist=
--- Memory Usage:
Total Memory = 2031616 Free Memory = 1651632
yanhan0615 2006-03-15
  • 打赏
  • 举报
回复
up 程序没有问题
输出如下
java.vendor=Sun Microsystems Inc.

file.separator=\

java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport...

sun.cpu.endian=little

sun.io.unicode.encoding=UnicodeLittle

sun.cpu.isalist=pentium i486 i386

--- Memory Usage:

Total Memory = 2031616 Free Memory = 1552480
interpb 2006-03-15
  • 打赏
  • 举报
回复
java Property

不是 java Propery

62,629

社区成员

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

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