我的项目中有错误。我不确定发生了什么,但我正在处理我的应用程序,突然主题文件停止工作。当我尝试访问Theme.res文件时,收到错误消息
加载资源文件时发生致命错误:java.io.EFOException
当我运行项目时,控制台输出显示:
[EDT] 0:0:0,17 - Exception: java.io.EOFException - null
java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at com.codename1.ui.util.Resources.openFileImpl(Resources.java:281)
at com.codename1.ui.util.Resources.openFile(Resources.java:269)
at com.codename1.ui.util.Resources.<init>(Resources.java:189)
at com.codename1.ui.util.Resources.open(Resources.java:740)
at com.codename1.ui.util.Resources.openLayered(Resources.java:702)
at com.codename1.ui.util.Resources.openLayered(Resources.java:666)
at com.codename1.ui.plaf.UIManager.initFirstTheme(UIManager.java:1551)
at com.prestonwhite.productionpumpapp.Run.init(Run.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43
at java.lang.reflect.Method.invoke(Method.java:498)
at com.codename1.impl.javase.Executor$1$1.run(Executor.java:117)
at com.codename1.ui.Display.processSerialCalls(Display.java:1056)
at com.codename1.ui.Display.mainEDTLoop(Display.java:873)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
java.lang.NullPointerException
at com.prestonwhite.productionpumpapp.Run.init(Run.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.codename1.impl.javase.Executor$1$1.run(Executor.java:117)
at com.codename1.ui.Display.processSerialCalls(Display.java:1056)
at com.codename1.ui.Display.mainEDTLoop(Display.java:873)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Java Result: 1
我不知道发生了什么,因为一切都运行正常,然后突然发生了这个错误。我该怎么做才能解决这个问题?我可以恢复/恢复我的Theme.res文件吗?
注意:我在Windows 7上使用Netbeans。