#338 SVG export only works with OracleJRE6

Gabriele Giacone

Forwarding Debian bug http://bugs.debian.org/657700

SVG export only works with OracleJRE 6 and it doesn't with OpenJDK 6 nor 7 nor OracleJRE 7.
Debian JDK now defaults to OpenJDK 6, replaced by 7 in the near future.


  • Fixed in version 4.2

  • Arie Skliarouk
    Arie Skliarouk

    SVG export does not work in openjdk 7:
    [warning] /usr/bin/sweethome3d: Unable to locate /usr/lib/jvm/java-6-sun/jre/lib/javaws.jar in /usr/share/java
    Java 3D: implicit antialiasing enabled
    at org.freehep.graphicsio.svg.SVGGraphics2D.writeImage(SVGGraphics2D.java:569)
    at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:482)
    at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:371)
    at org.freehep.graphics2d.VectorGraphics.fill(VectorGraphics.java:287)
    at org.freehep.graphicsio.svg.SVGGraphics2D.fill(SVGGraphics2D.java:467)
    at com.eteks.sweethome3d.swing.PlanComponent.fillAndDrawWallsArea(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent.paintWalls(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent.paintHomeItems(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent.paintContent(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent.access$1800(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent$SVGSupport.exportToSVG(Unknown Source)
    at com.eteks.sweethome3d.swing.PlanComponent.exportToSVG(Unknown Source)
    at com.eteks.sweethome3d.swing.HomePane.exportToSVG(Unknown Source)
    at com.eteks.sweethome3d.viewcontroller.HomeController$38.call(Unknown Source)
    at com.eteks.sweethome3d.viewcontroller.HomeController$38.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at com.eteks.sweethome3d.viewcontroller.ThreadedTaskController$1.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.NullPointerException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.freehep.graphics2d.PixelGraphics2D.<clinit>(PixelGraphics2D.java:101)
    ... 24 more

  • Arie Skliarouk
    Arie Skliarouk

    forgot to say the sweethome3d is of version 4.3-1~getdeb1

  • Could you check that this version that I don't maintain directly contains a library file
    I fear the maintainer didn't update the libraries and kept the older file
    that was buggy with Java 7.
    If this is the case, please tell them to update that file.

  • Arie Skliarouk
    Arie Skliarouk

    The getdeb package (taken from http://ftp.dk.debian.org/getdeb/ubuntu/pool/apps/s/sweethome3d/)
    includes sweethome3d.jar that includes the freehep-vectorgraphics-svg-2.1.1b.jar file (albeit in the root directory of the jar file).

    I am not sure whether sweethome3d uses correct version - I am not familiar enough with java and jar files..

  • I installed the deb file you mentioned and saw the same files as you, but I don't know how /usr/bin/sweethome3d script exactly works.
    From what I understand, it depends on freehep (the library that manages SVG export) but I don't think it uses the freehep-vectorgraphics-svg-2.1.1b.jar file included in sweethome3d.jar file, because it runs com.eteks.sweethome3d.SweetHome3D main class and not com.eteks.sweethome3d.SweetHome3DBootstrap class.
    Please report this issue to the .deb maintainers.

  • On Debian it's not fixed yet. See http://bugs.debian.org/657700
    I'll try to make it uploaded asap.

  • Christoph Korn
    Christoph Korn

    Will be fixed in the GetDeb package soon.

  • Christoph, if you include the Jar executable version of Sweet Home 3D, you need to depend only from Java, and use com.eteks.sweethome3d.SweetHome3DBootstrap main class. This main class extracts in temporary files the Jar files included in the Jar executable of Sweet Home 3D but it really goes fast.

  • Christoph Korn
    Christoph Korn

    The fix has been published.

    I left the dependency on the other packages so I can easily revert the fix when the package in Debian and Ubuntu itself is fixed.

  • Thanks Christoph :-)
    Arie, please check it works for you.

  • Arie Skliarouk
    Arie Skliarouk

    Works perfectly, now I can get rid of the java-6-sun package!

    Huge thank you to both of you, Emmanuel and Christoph!