Batik does not preview svg files locating inside a folder

I use apache batik to display some svg files on my program. Below is an example code which just shows an svg file in a frame.

public class SVGViewer {
    public SVGViewer() {
        JFrame frame = new JFrame("SVG Viewer");
        frame.setPreferredSize(new Dimension(500, 500));
        frame.setVisible(true);
        frame.pack();

        JSVGCanvas c = new JSVGCanvas();
        c.setURI("folder/image.svg");
        c.setSize(500,500);
        c.setLocation(0, 0);
        frame.add(c);
    }
public static void main(String[] args) {
        new SVGViewer();
    }
}

Using the following svg as the image I want to see,

<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 512 352" enable-background="new 0 0 512 352" xml:space="preserve">
<filter  id="DropShadow">
    <feGaussianBlur  stdDeviation="3"></feGaussianBlur>
</filter>
<g id="XMLID_1_" filter="url(#DropShadow)">
    <path id="XMLID_13_" fill="#231F20" d="M485,349.5H27c-13.5,0-24.5-11-24.5-24.5V27c0-13.5,11-24.5,24.5-24.5h458
        c13.5,0,24.5,11,24.5,24.5v298C509.5,338.5,498.5,349.5,485,349.5z"/>
</g>
</svg>

I get this error (and no image is displayed)

The thing is that when I move the image outside the folder, I see it normally. It may has to do something about the DOM of the file but I am not very familiar with this. Any ideas?

The code above works if you enter the absolute path of the svg file like this:

String currentPath = System.getProperty("user.dir");
c.setURI("file:/" + currentPath + "/test/image.svg");