J2ME createImage on a Sanyo RL-4920

Started by
3 comments, last by ZenDarva 19 years, 6 months ago
While the calls seem to work in the emulator they crash the app when I upload them to my phone and try to run them. Well, the calls don't crash, they just don't work, so you get a null exception when you attempt to actually use the image. (This is only when loading a picture, using a blank image as a buffer works fine) Anyone have any idea's on this? A little test scriptlet and some debugging code, and i find i'm getting a file not found error. Doesn't WTK pack any files in the /res directory into the jar? Does the path perhaps change? [Edited by - ZenDarva on September 28, 2004 6:16:44 PM]
Advertisement
What have you used to export the PNGs? What's the filename you're using? Is it being correctly placed into the JAR?
I created the PNG's in Paint. And i don't really know how to check if they're in the Jar's or not, besides opening them in a text editor and doing a search for the filenames.

I've downloaded some other people's midlets and had problems with them too, so I'm not sure it's a code issue, I'm a bit worried it's some sort of compatability problem.

The filename is sprite.png, i'm actually using a modified version of one of the examples from this article: http://www.gamedev.net/reference/articles/article1949.asp

JARs are really renamed ZIPs, so you can just open them with WinZip or whatever (changing the extension if necessary). Make sure that the filename and path are correct, and remember that capitalization DOES matter and that all filenames in J2ME should start with a forward slash.
Wow! I feel stupid. It was a capitilization problem. Urgh.

Thank you!

This topic is closed to new replies.

Advertisement