title: Batik URL exception in Windows
body: <p>I'm working on this program that does some manual parsing and changing svg files where I'm only using Batik to create previews of the SVG files in question.</p>
  
  <p>It's supposed to read all SVG files within a directory and to show the images I'm using Batik along with this transcoder class I found online as a suggestion for another program some time ago:</p>
  
  <pre><code>public class BufferedImageTranscoder extends ImageTranscoder {
          private BufferedImage image = null;     
          @Override
          public BufferedImage createImage(int weight, int height)
          {
              return new BufferedImage(weight, height, BufferedImage.TYPE_INT_ARGB);
          }   
          @Override
          public void writeImage(BufferedImage image, TranscoderOutput output) throws TranscoderException
          {
              this.image = image;
          }
          public BufferedImage getBufferedImage()
          {
              return image;
          }
  
          public static BufferedImage loadImage(File svgFile, float width, float height) {
              BufferedImageTranscoder imageTranscoder = new BufferedImageTranscoder();
              imageTranscoder.addTranscodingHint(PNGTranscoder.KEY_WIDTH, width);
              imageTranscoder.addTranscodingHint(PNGTranscoder.KEY_HEIGHT, height);
              try {
                  String path = svgFile.getCanonicalPath();
                  System.out.println(path);
                  TranscoderInput input = new TranscoderInput(path);
                  if(input != null)
                      imageTranscoder.transcode(input, null);
              } catch (TranscoderException e) {
                  e.printStackTrace();
                  return null;
              } catch (IOException e) {
                  e.printStackTrace();
                  return null;
              }
              return imageTranscoder.getBufferedImage();
          }
  }
  </code></pre>
  
  <p>On macOS this program seems to work perfectly fine without issues, but when I load the project into Eclipse in Windows I get this exception:</p>
  
  <blockquote>
    <p>Enclosed Exception: Unable to make sense of URL for connection    at
    org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:136)
      at
    org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)</p>
  </blockquote>
  
  <p>Any idea what causes this and how I can fix it?</p>