Problem to load image under Palm env

Hi,

I try to load an image like:

image = Image.createImage("/logo.png");

I run this under Ktoolbar I've put the logo.png in /res dir. When I try with motorola I see the picture when i run under pose I receive :

java.io.IOException: Couldn't find resource

How to find the ressource for both environement ? where to put the image ? and the path to give on createImage ?

Thanks

Richard Grossman

[449 byte] By [richiegr] at [2007-9-26 15:55:59]
# 1
Richard, the image needs to be part of the jar of your project. It then gets converted into the prc which gets loaded into POSE
d1camero at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
See previous posting http://forum.java.sun.com/thread.jsp?forum=50&thread=194102
d1camero at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

Hi,

Sorry but here is the last replay for this thread:

hi,

thanks again, now it's working, i wrote wrong the package path on the settings in the ktoolbar.

Now i see my "beautiful icon" on the phone emulator running the midlet in the ktoolbar, and also it finds the other resource files, but when i convert the jar-jad files to a prc file for the Palm emulator, even that the png files are in the jar file, i dont see the icon in the palm emulator and i think i get an exception or something that i dont see 'cos the program doesn't respond to my pointer events...but i dont think this has something to do...

bye,

Laura

She has exactly the same problem It's work under the phone emulator but not undre POSE emulator any hint ?

Thanks

Richard

richiegr at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Hi,

Sorry but here is the last replay for this thread:

hi,

thanks again, now it's working, i wrote wrong the package path on the settings in the ktoolbar.

Now i see my "beautiful icon" on the phone emulator running the midlet in the ktoolbar, and also it finds the other resource files, but when i convert the jar-jad files to a prc file for the Palm emulator, even that the png files are in the jar file, i dont see the icon in the palm emulator and i think i get an exception or something that i dont see 'cos the program doesn't respond to my pointer events...but i dont think this has something to do...

bye,

Laura

She has exactly the same problem It's work under the phone emulator but not undre POSE emulator any hint ?

Thanks

Richard

richiegr at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

Hi,

Sorry but here is the last replay for this thread:

hi,

thanks again, now it's working, i wrote wrong the package path on the settings in the ktoolbar.

Now i see my "beautiful icon" on the phone emulator running the midlet in the ktoolbar, and also it finds the other resource files, but when i convert the jar-jad files to a prc file for the Palm emulator, even that the png files are in the jar file, i dont see the icon in the palm emulator and i think i get an exception or something that i dont see 'cos the program doesn't respond to my pointer events...but i dont think this has something to do...

bye,

Laura

She has exactly the same problem It's work under the phone emulator but not with Prc and POSE emulator

Any hint ?

Thanks

Richard

richiegr at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6
Did you add it to your jar? Are you using Forte? How do you build the jar? What does your directory structure look like?Images appear fine in POSE if you have them in the jar and properly referenced.
d1camero at 2007-7-2 19:04:52 > top of Java-index,Java Mobility Forums,Java ME Technologies...