There's certainly a few different ways to get eclipse to put the image in
/res instead of the root. I just wanted to see if that was the problem
before delving into why.

Since he says the image is in the JAR, the problem is either a bad path or
bad spelling. I got the impression that the code and images are the same
using WTK and EclipseME, so that left the path as the most likely candidate.

Tom 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Markus Sinner
> Sent: Thursday, September 27, 2007 9:24 AM
> To: [email protected]
> Subject: Re: [Eclipseme-users] IOException at 
> Image.createImage("/image.png")
> 
> If eclipseME is configured the right way, then the a file in 
> res will be placed in the root - so the access to 
> "/image.png" is right. I suppose that it is not included in 
> the output JAR.
> 
> If it is NOT there, take a look at the project settings. The 
> res-dir has to be active in the tab "Order and Export" in 
> Java Build Path.
> 
> Tom Hubina schrieb:
> > It is probably in a different directory inside the jar 
> file. Your code 
> > expects it to be in the root, but it's probably in /res.
> > 
> > Tom
> > 
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On 
> Behalf Of 
> >> Gunduz Can Topal
> >> Sent: Thursday, September 27, 2007 8:58 AM
> >> To: 'Markus Sinner'; [email protected]
> >> Subject: Re: [Eclipseme-users] IOException at
> >> Image.createImage("/image.png")
> >>
> >> Yes I did it and the file is there..
> >>
> >>  
> >>
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On 
> Behalf Of 
> >> Markus Sinner
> >> Sent: Thursday, September 27, 2007 6:46 PM
> >> To: [email protected]
> >> Subject: Re: [Eclipseme-users] IOException at
> >> Image.createImage("/image.png")
> >>
> >> Can you have a look at the created Jar? Maybe the file is not 
> >> included.
> >>
> >> Try "unzip -l file.jar" or open the jar with a ZIP-Program 
> and look, 
> >> if the /image.png is there.
> >>
> >> Markus
> >>
> >> Gunduz Can Topal schrieb:
> >>> Hello,
> >>>
> >>> I have some trouble with displaying images in eclipseme. 
> >>>
> >>> I am putting the image on the res folder (it is configures
> >> as resource
> >>> directory) still when I deploy, application can not read
> >> the file. My
> >>> platform is eclipse 3.2 with java 5.0.
> >>>
> >>> When I build the sources and run in SUN WTK 2.5.1 it works fine. 
> >>>
> >>> Did anyone experience and solve the same problem? 
> >>>
> >>> Regards,
> >>>
> >>> Gunduz.
> >>>
> >>>
> >>>
> >>>
> >>>
> >> 
> ---------------------------------------------------------------------
> >> -
> >>> --- This SF.net email is sponsored by: Microsoft Defy all
> >> challenges. 
> >>> Microsoft(R) Visual Studio 2005.
> >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >>> _______________________________________________
> >>> Eclipseme-users mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> >> --
> >>
> >> *********************************
> >> [EMAIL PROTECTED]
> >> http://www.psitronic.de
> >>
> >> psitronic IT-Solutions
> >> Markus Sinner
> >> W-Rathenau-Str. 14 - 68642 Bürstadt
> >> Tel.: (+49)6206 / 963513
> >> Fax:  (+49)6206 / 963514
> >>
> >> --------------------------------------------------------------
> >> -----------
> >> This SF.net email is sponsored by: Microsoft Defy all challenges. 
> >> Microsoft(R) Visual Studio 2005.
> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >> _______________________________________________
> >> Eclipseme-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> >>
> >>
> >> --------------------------------------------------------------
> >> -----------
> >> This SF.net email is sponsored by: Microsoft Defy all challenges. 
> >> Microsoft(R) Visual Studio 2005.
> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >> _______________________________________________
> >> Eclipseme-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> >>
> > 
> > 
> > 
> ----------------------------------------------------------------------
> > --- This SF.net email is sponsored by: Microsoft Defy all 
> challenges. 
> > Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Eclipseme-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> 
> -- 
> 
> *********************************
> [EMAIL PROTECTED]
> http://www.psitronic.de
> 
> psitronic IT-Solutions
> Markus Sinner
> W-Rathenau-Str. 14 - 68642 Bürstadt
> Tel.: (+49)6206 / 963513
> Fax:  (+49)6206 / 963514
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Microsoft Defy all 
> challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Eclipseme-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Eclipseme-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to