程序:
// Property.java
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());
}
}在Jcreator中建立了一个空工作区"Property",在其中增加了一个Property类.直接添入上述代码进行调试.
错误提示:
Exception in thread "main" java.long.NoClassDefFoundError:Property
Press any key to continue...谢谢!
顺便告诉我怎么给大家加分!
// Property.java
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());
}
}在Jcreator中建立了一个空工作区"Property",在其中增加了一个Property类.直接添入上述代码进行调试.
错误提示:
Exception in thread "main" java.long.NoClassDefFoundError:Property
Press any key to continue...谢谢!
顺便告诉我怎么给大家加分!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货