You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Marek Berkan <ma...@mberkan.pl> on 2004/03/24 14:55:35 UTC

Loading document from jar with Java Web Start

Hello.

I have a problem: My application use JSVGCanvas to display svg document.
SVG file is in 'resources' directory and when I starts application
locally all works fine. But when I starts it as Java Web Start loading
with URI canvas.setURI(...) not work. I try with uri like
"jar:file:///myjar.jar!/resources/doc.svg", but this uri points to root
directory at client machine. But I don't now where jws is placing
downloaded jars...

So, it is possible, and how to load svg document with JSVGCanvas from
jar downloaded by Java Web Start?

Regards,
Marek.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Loading document from jar with Java Web Start

Posted by Marek Berkan <ma...@mberkan.pl>.
W liƛcie z czw, 25-03-2004, godz. 12:50, Thomas DeWeese pisze: 
> I would use the ClassLoader 'find' methods.  These can then
> provide URL's which you can pass to the Canvas.

I use ClassLoader's method getResource(...) and it works!

Thanks,
Marek.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Loading document from jar with Java Web Start

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Marek,

I would use the ClassLoader 'find' methods.  These can then
provide URL's which you can pass to the Canvas.


Marek Berkan wrote:

> Hello.
> 
> I have a problem: My application use JSVGCanvas to display svg document.
> SVG file is in 'resources' directory and when I starts application
> locally all works fine. But when I starts it as Java Web Start loading
> with URI canvas.setURI(...) not work. I try with uri like
> "jar:file:///myjar.jar!/resources/doc.svg", but this uri points to root
> directory at client machine. But I don't now where jws is placing
> downloaded jars...
> 
> So, it is possible, and how to load svg document with JSVGCanvas from
> jar downloaded by Java Web Start?
> 
> Regards,
> Marek.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org