Building on this answer, these are the steps that made Firefox work for me inside Eclipse:
- Install the Ajax Tools Framework (http://wiki.eclipse.org/ATF/Installing)
- Under "Run Configurations..." -> "Plug-ins" add
org.mozilla.xulrunner
andorg.mozilla.xulrunner.win32.win32.x86
Start Firefox within swt.browser using the following code:
Bundle bundle = Platform.getBundle("org.mozilla.xulrunner"); //$NON-NLS-1$ if (bundle != null) { URL resourceUrl = bundle.getResource("xulrunner"); //$NON-NLS-1$ if (resourceUrl != null) { try { URL fileUrl = FileLocator.toFileURL(resourceUrl); File file = new File(fileUrl.toURI()); System.setProperty("org.eclipse.swt.browser.DefaultType", "mozilla"); System.setProperty( "org.eclipse.swt.browser.XULRunnerPath", file.getAbsolutePath()); //$NON-NLS-1$ } catch (IOException e) { e.printStackTrace(); } catch (URISyntaxException e) { e.printStackTrace(); } } } else { System.err.println("Could not find XULrunner bundle"); } Browser webBrowser = new Browser(parent, SWT.MOZILLA); GridData grid = new GridData(GridData.FILL_BOTH); webBrowser.setLayoutData(grid); // Prepending "file://" prevents the "<driveletter> is not a registered protocol" error String graphUrl = "file://C:/Users/you/yourGraph.html" webBrowser.setUrl(graphUrl);