Startup() SingleFrameApplication 出现问题警告:getApplicationResourceMap():没有应用程序类
我使用 NetBeans 创建了一个项目。我做了一个检查更新的课程。如果有则进行升级,否则将启动主项目类。
问题是当我创建 MyClassApp 对象并使用 myClass.startup() 启动时,我得到了这些错误......我以为这是我的更新类,所以我尝试使用普通的 main ,而不需要任何东西,只需创建 MyClassApp 并启动startup()但它得到了同样的错误。
我该如何修复它?
26-set-2011 12.34.32 org.jdesktop.application.ResourceManager getApplicationResourceMap
WARNING: getApplicationResourceMap(): no Application class
26-set-2011 12.34.36 org.jdesktop.application.SingleFrameApplication initRootPaneContainer
WARNING: couldn't restore sesssion [mainFrame.session.xml]
java.lang.NullPointerException
at org.jdesktop.application.LocalStorage.getApplicationId(LocalStorage.java:195)
at org.jdesktop.application.LocalStorage.getDirectory(LocalStorage.java:234)
at org.jdesktop.application.LocalStorage$LocalFileIO.openInputFile(LocalStorage.java:330)
at org.jdesktop.application.LocalStorage.openInputFile(LocalStorage.java:76)
at org.jdesktop.application.LocalStorage.load(LocalStorage.java:138)
at org.jdesktop.application.SessionStorage.restore(SessionStorage.java:382)
at org.jdesktop.application.SingleFrameApplication.initRootPaneContainer(SingleFrameApplication.java:231)
at org.jdesktop.application.SingleFrameApplication.show(SingleFrameApplication.java:463)
I created a project with NetBeans. I did a class that checkForUpdates. If there are it does the updgrade otherwise it starts main project class.
The problem is when i Create object of MyClassApp and i launch with myClass.startup() i got those errors....I thought that was my update class so I tryed with a normal main without anything just create MyClassApp and launch startup() but it gets the same errors.
How can i fix it?
26-set-2011 12.34.32 org.jdesktop.application.ResourceManager getApplicationResourceMap
WARNING: getApplicationResourceMap(): no Application class
26-set-2011 12.34.36 org.jdesktop.application.SingleFrameApplication initRootPaneContainer
WARNING: couldn't restore sesssion [mainFrame.session.xml]
java.lang.NullPointerException
at org.jdesktop.application.LocalStorage.getApplicationId(LocalStorage.java:195)
at org.jdesktop.application.LocalStorage.getDirectory(LocalStorage.java:234)
at org.jdesktop.application.LocalStorage$LocalFileIO.openInputFile(LocalStorage.java:330)
at org.jdesktop.application.LocalStorage.openInputFile(LocalStorage.java:76)
at org.jdesktop.application.LocalStorage.load(LocalStorage.java:138)
at org.jdesktop.application.SessionStorage.restore(SessionStorage.java:382)
at org.jdesktop.application.SingleFrameApplication.initRootPaneContainer(SingleFrameApplication.java:231)
at org.jdesktop.application.SingleFrameApplication.show(SingleFrameApplication.java:463)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道是什么原因导致这个错误,但我有一个解决方案。
您可能有一个如下定义的类:
如果您使用以下命令启动您的应用程序,
您可能不会收到任何错误。
I don't know what causes this error, but I have a solution.
You probably have a class as defined below:
If you start your application with
You probably won't get any error.