Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wierd AWT exception on loading graphics



I've been sort of on holiday working on a small awt app (MetaFlux) under OS 9 (ide CodeWarrior 8) on my iBook reusing well-established code to load a background graphic. The app was fine until suddenly it started throwing the following run-time exception:

Exception Occurred:
java.lang.NullPointerException
at sun.misc.Cache.get(Cache.java)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java)
at sun.awt.SunToolkit.getImage(SunToolkit.java)
at PathPanel.loadBGImage(PathPanel.java:44)
at PathPanel.<init>(PathPanel.java:28)
at MetaFlux.setup(MetaFlux.java:67)
at MetaFlux.<init>(MetaFlux.java:26)
at MetaFlux.main(MetaFlux.java:31)
at com.apple.mrj.JManager.JMStaticMethodDispatcher.run(JMAWTContextImpl.java)
at java.lang.Thread.run(Thread.java)

This didn't occur when I commented out the graphic load but did when I added a small splash screen using code used in previous apps. Backups that had worked previously also threw the exception. The wierd thing is that the jar file worked fine on Windows under Virtual PC on the Machine or in its OSX partiton, and when I got home and ran the app on another machine under OS9 it was OK. I assume something must have suddenly gone with my Java run-time environment (although the old apps with splash screens still run.)

Can anyone who understands the sun Cache stuff explain this.

Thanks.

David
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.