当前位置: 技术问答>java相关
为何我的程序运行不了
来源: 互联网 发布时间:2017-04-20
本文导语: Think in Java 中的例子 //: Property.java import java.util.*; /** The first Think in Java example program. * @author Bruce Eckel * @version 1.0 */ public class Property { /** Sole entry point to class &application * @param args array of st...
Think in Java 中的例子
//: Property.java
import java.util.*;
/** The first Think in Java example program.
* @author Bruce Eckel
* @version 1.0
*/
public class Property
{
/** Sole entry point to class &application
* @param args array of string arguments
* @return No return value
* @exception No Exception thrown
*/
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());
}
}///:~
Javac 通过
java编译时,错误
Exception in thread "main" java.lang.NoClassDefFoundError: Property/class
请各位指点
//: Property.java
import java.util.*;
/** The first Think in Java example program.
* @author Bruce Eckel
* @version 1.0
*/
public class Property
{
/** Sole entry point to class &application
* @param args array of string arguments
* @return No return value
* @exception No Exception thrown
*/
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());
}
}///:~
Javac 通过
java编译时,错误
Exception in thread "main" java.lang.NoClassDefFoundError: Property/class
请各位指点
|
很高兴能帮你一把.