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 Fabio Biscaro <bi...@webscience.it> on 2003/12/02 18:11:05 UTC

Images in jar. Sample

Here i post an example of an svg that i would like to have in a jar.
You can unzip it in your root directory.

I tried to load it by using this java code:

svgCanvas.setUri("jar:file:/jar/qco.jar!prova.svg");
( I tried other combinations too)

But no way. I cant get rid of "Unable to make sense of URL connection"!

Can you help me?

Thanks, 
Fabio


R: Images in jar. Sample

Posted by Fabio Biscaro <bi...@webscience.it>.
Thank for help!

This morning i noticed that my error was really the "/" after !.

Thanks!

Fabio

-----Messaggio originale-----
Da: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
Inviato: martedì 2 dicembre 2003 19.24
A: Batik Users
Oggetto: Re: Images in jar. Sample


Fabio Biscaro wrote:

> Here i post an example of an svg that i would like to have in a jar. 
> You can unzip it in your root directory.
> 
> I tried to load it by using this java code:
> 
> svgCanvas.setUri("jar:file:/jar/qco.jar!prova.svg");
> ( I tried other combinations too)

    The following is what I used on a Windows box and it worked:

jar:file:d:/batik/test/jartest/qco.jar\!/prova.svg

    Most notable the '/' after '!'.  It appears this is required.

> But no way. I cant get rid of "Unable to make sense of URL 
> connection"!




---------------------------------------------------------------------
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


Re: Images in jar. Sample

Posted by Thomas DeWeese <Th...@Kodak.com>.
Fabio Biscaro wrote:

> Here i post an example of an svg that i would like to have in a jar.
> You can unzip it in your root directory.
> 
> I tried to load it by using this java code:
> 
> svgCanvas.setUri("jar:file:/jar/qco.jar!prova.svg");
> ( I tried other combinations too)

    The following is what I used on a Windows box and it worked:

jar:file:d:/batik/test/jartest/qco.jar\!/prova.svg

    Most notable the '/' after '!'.  It appears this is required.

> But no way. I cant get rid of "Unable to make sense of URL connection"!




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