Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-585

Can't connect to X11 window server ...

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: SVGGraphics2D
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: Other

      Description

      On Red Hat Enterprise Linux V9.3 (JRE 1.4) I run a GUI application, when
      performing Finish, the following code will run:

      DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument(null, "svg", null);
      svgGraphics = new SVGGraphics2D(document);

      SVGGraphics2D throws the following exception:

      java.lang.NoClassDefFoundError: sun.awt.X11GraphicsEnvironment
      at java.lang.Class.initialize(Class.java:318)
      at java.lang.Class.forNameImpl(Native Method)
      at java.lang.Class.forName(Class.java:116)
      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment
      (GraphicsEnvironment.java:91)
      at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1073)
      at org.apache.batik.svggen.SVGGraphics2D.<init>(Unknown Source)
      at org.apache.batik.svggen.SVGGraphics2D.<init>(Unknown Source)
      at com.ibm.wbit.reporting.imageutility.BToolsDraw2dSvgGraphics.<init>
      (Unknown Source)

      Note: the X11 window server is running and I can start a GUI application, so
      the DISPLAY variable is set fine and the authorization is correct.

      My application runs without problems on Windoxs XP and Suse Linux Enterprise
      Server.

      If I set java.awt.headless="true", then all works fine -> no Error/Exception
      will be thrown. But I really do not know why it works with this JVM setting,
      because I do not have headless Java -> I have a GUI application. So I think,
      this could not be the solution - propably a workaround, but hen I need a
      description for this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
                Reporter:
                bjakob@de.ibm.com Bernhard Jakob
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: