To capitalized this mailing list thread :

   1 connect(rmiRegistryLocation);
   2 canvas = new JSVGCanvas();
   3 canvas.setDocument(createDoc());


Note the DOC_URI constant. It helps the user to set up the URI of the document. If the document works from itself, in a standalone mode and does not refers to other relative paths, it can be set at null.

Else, it is necessary to put an URI that points to a non existant file so that the relative URI can be resolved.

For example, an SVG document that refers to a widgets.svg file in a tag like this one:

<use x="-53.175" y="-194.283" xmlns:xlink="" xlink:href="widgets.svg#BarGauge" xlink:type="simple" xlink:actuate="onLoad" id="bar2" height="388.566" xlink:show="embed"/>

should be set up with an URI that points on a file of the same directory as the widgets.svg file.

It is possible to use some jar file URL to point inside a jar (so you can embed symbols svg inside your jar): jar:file:///E:/ATOLE/gate/animator/MoowClient.jar!/panel.svg

InputStreamInitialisation (last edited 2010-01-04 15:32:34 by 204)