The forward slash (/) doesn't work on Windows.

On May 4, 5:21 pm, Rajeev Dayal <[email protected]> wrote:
> Actually, the documentation says that GWT uses ClassLoader.getResource(..)
> to locate images. As a result, the syntax that you use in the annotation
> *should* be OS-agnostic. You should always use forward slashes ( / ) to
> separate path components.
>
> Is that not working for you?
>
> On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick 
> <[email protected]>wrote:
>
>
>
> > I have a relative path use in the @Resource attribute on my image
> > bundle. Apparently the direction of the slashes are important and
> > depend on what OS I'm building my project.
>
> > On Windows it has to be "\"  and on Linux - "/".
>
> >        public interface Images extends ImageBundle
> >        {
> >               �...@resource("images/Dialogue_Corner.gif")
> >                AbstractImagePrototype TopLeft();
> >        }
>
> > The documentation mentions that the GWT uses System.getResource method
> > to locate the images.
>
> > Any idea how to make it OS independent?
>
> > BWT: if the application written correctly on the Windows, it should
> > pick the Linux slash "/" with no problem, but, apparently, Java
> > getResource is not the case.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to