I created a program to create a calendar as an svg image and it works just fine when I run it on windows, however when run on a mac it just creates an empty svg file. Can someone please help me figure out what is going on?
public void getSVG() throws IOException
{
DOMImplementation imp = SVGDOMImplementation.getDOMImplementation();
String s = SVGDOMImplementation.SVG_NAMESPACE_URI;
SVGDocument doc = (SVGDocument) imp.createDocument(s, "svg", null);
SVGGraphics2D svgGen = new SVGGraphics2D(doc);
String ss = findFile().getAbsolutePath();
Writer out = new FileWriter(ss);
this.paint(svgGen);
svgGen.stream(out, true);
out.flush();
out.close();
}
I haven’t tried much of anything, as it works just fine on windows. I don’t know why it would be different on mac.