Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088966

[SWT, Linux, GTK3] FxCanvas can't handle gtk3 libs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u6
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Ubuntu 12.04 x64

      Description

      Eclipse Luna force loads gtk3 libs on Linux / Unix - https://bugs.eclipse.org/bugs/show_bug.cgi?id=420182
      Every time after running the above sample against gtk3 libs, the native error will appear.

      import org.eclipse.swt.SWT;
      import org.eclipse.swt.layout.FillLayout;
      import org.eclipse.swt.widgets.Composite;
      import org.eclipse.swt.widgets.Display;
      import org.eclipse.swt.widgets.Shell;

      import javafx.embed.swt.FXCanvas;
      import javafx.scene.Scene;
      import javafx.scene.web.WebEngine;
      import javafx.scene.web.WebView;

      public class JavaFxBrowser extends FXCanvas {

      public JavaFxBrowser(Composite parent) {
      super(parent, SWT.NONE);
      WebView browser = new WebView();
      this.setScene(new Scene(browser));
      WebEngine webEngine = browser.getEngine();
      webEngine.load("http://www.oracle.com");
      }

      public static void main(String[] args) {
      Display display = new Display();
      Shell shell = new Shell(display);
      shell.setLayout(new FillLayout());
      JavaFxBrowser javaFxBrowser = new JavaFxBrowser(shell);
      shell.open();
      while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
      display.sleep();
      }
      display.dispose();
      }
      }

      SWT_GTK3=1 - this environmental variable should be added

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ddhill David Hill (Inactive)
                Reporter:
                ibuziukjfx Ilya Buziuk (Inactive)
              • Votes:
                2 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: