当前位置: 代码迷 >> J2SE >> new 一个 Date,用 eclipse 输出,如何有异常呢
  详细解决方案

new 一个 Date,用 eclipse 输出,如何有异常呢

热度:793   发布时间:2016-04-24 00:24:59.0
new 一个 Date,用 eclipse 输出,怎么有错误呢

Java code
public class CloneTest{    public static void main(String[] args)    {        Date d = new Date();        System.out.println(  d.toString() );            }}


上面代码,如果按 Ctrl + F11 运行就没问题。如果按F11,那调试窗口输出下面的东西


Java code
CloneTest [Java 应用程序]        本地主机 52205 处的 CloneTest            线程 [main](已暂挂(异常 FileNotFoundException))                FileInputStream.open(String) 行: 不可用 [本机方法]                FileInputStream.<init>(File) 行: 不可用                ZoneInfoFile$1.run() 行: 不可用                AccessController.doPrivileged(PrivilegedExceptionAction<T>) 行: 不可用 [本机方法]                ZoneInfoFile.readZoneInfoFile(String) 行: 不可用                ZoneInfoFile.createZoneInfo(String) 行: 不可用                ZoneInfoFile.getZoneInfo(String) 行: 不可用                ZoneInfo.getTimeZone(String) 行: 不可用                TimeZone.getTimeZone(String, boolean) 行: 不可用                TimeZone.setDefaultZone() 行: 不可用                TimeZone.getDefaultRef() 行: 不可用                Date.normalize() 行: 不可用                Date.toString() 行: 不可用                String.valueOf(Object) 行: 不可用                PrintStream.println(Object) 行: 不可用                CloneTest.main(String[]) 行: 11        D:\JDK\bin\javaw.exe(2012-7-26 下午02:49:47)    CloneTest [Java 应用程序]        本地主机 52216 处的 CloneTest            线程 [main](已暂挂(异常 FileNotFoundException))                FileInputStream.open(String) 行: 不可用 [本机方法]                FileInputStream.<init>(File) 行: 不可用                ZoneInfoFile$1.run() 行: 不可用                AccessController.doPrivileged(PrivilegedExceptionAction<T>) 行: 不可用 [本机方法]                ZoneInfoFile.readZoneInfoFile(String) 行: 不可用                ZoneInfoFile.createZoneInfo(String) 行: 不可用                ZoneInfoFile.getZoneInfo(String) 行: 不可用                ZoneInfo.getTimeZone(String) 行: 不可用                TimeZone.getTimeZone(String, boolean) 行: 不可用                TimeZone.setDefaultZone() 行: 不可用                TimeZone.getDefaultRef() 行: 不可用                Date.normalize() 行: 不可用                Date.toString() 行: 不可用                <旧方法,位于><未知声明类型>>        D:\JDK\bin\javaw.exe(2012-7-26 下午02:51:33)    CloneTest [Java 应用程序]        本地主机 52223 处的 CloneTest            线程 [main](已暂挂(异常 FileNotFoundException))                FileInputStream.open(String) 行: 不可用 [本机方法]                FileInputStream.<init>(File) 行: 不可用                ZoneInfoFile$1.run() 行: 不可用                AccessController.doPrivileged(PrivilegedExceptionAction<T>) 行: 不可用 [本机方法]                ZoneInfoFile.readZoneInfoFile(String) 行: 不可用                ZoneInfoFile.createZoneInfo(String) 行: 不可用                ZoneInfoFile.getZoneInfo(String) 行: 不可用                ZoneInfo.getTimeZone(String) 行: 不可用                TimeZone.getTimeZone(String, boolean) 行: 不可用                TimeZone.setDefaultZone() 行: 不可用                TimeZone.getDefaultRef() 行: 不可用                Date.normalize() 行: 不可用                Date.toString() 行: 不可用                CloneTest.main(String[]) 行: 11        D:\JDK\bin\javaw.exe(2012-7-26 下午02:52:45)    CloneTest [Java 应用程序]        本地主机 52344 处的 CloneTest            线程 [main](已暂挂(异常 FileNotFoundException))                FileInputStream.open(String) 行: 不可用 [本机方法]                FileInputStream.<init>(File) 行: 不可用                ZoneInfoFile$1.run() 行: 不可用                AccessController.doPrivileged(PrivilegedExceptionAction<T>) 行: 不可用 [本机方法]                ZoneInfoFile.readZoneInfoFile(String) 行: 不可用                ZoneInfoFile.createZoneInfo(String) 行: 不可用                ZoneInfoFile.getZoneInfo(String) 行: 不可用                ZoneInfo.getTimeZone(String) 行: 不可用                TimeZone.getTimeZone(String, boolean) 行: 不可用                TimeZone.setDefaultZone() 行: 不可用                TimeZone.getDefaultRef() 行: 不可用                Date.normalize() 行: 不可用                Date.toString() 行: 不可用                CloneTest.main(String[]) 行: 11        D:\JDK\bin\javaw.exe(2012-7-26 下午02:57:42)
  相关解决方案