XPCOM error 0x80040111 - XULrunner 24, SWT 4.4M6, OSX [message #1328403] |
Fri, 02 May 2014 17:26 |
Dennis S Messages: 3 Registered: May 2014 |
Junior Member |
|
|
I'm new to SWT and I'm trying to create a browser. I can create a standard browser just fine by passing SWT.NONE but once I try to use SWT.MOZILLA I get errors.
I'm using XUL version 24, SWT version 2.4M6, Java 8, on Mac OS X 10.9.2.
My code is slightly modified from an eclipse example:
public static void main(String [] args) {
String xulrunnerDir = "/Library/Frameworks/XUL.framework";
System.setProperty("org.eclipse.swt.browser.XULRunnerPath", xulrunnerDir);
String html = "<HTML><HEAD><TITLE>HTML Test</TITLE></HEAD><BODY>";
for (int i = 0; i < 100; i++) html += "<P>This is line "+i+"</P>";
html += "</BODY></HTML>";
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
Browser browser;
try {
browser = new Browser(shell, SWT.MOZILLA);
} catch (SWTError e) {
System.out.println("Could not instantiate Browser: " + e.getMessage());
display.dispose();
return;
}
browser.setText(html);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
I'm also using the VM option:
During Browser initialization, an SWTError exception is thrown: XPCOM error 0x80040111
I have no idea how to proceed from here.
Is that the correct xulrunner path I should be using? Am I supposed to go deeper into the framework dir?
|
|
|
Powered by
FUDForum. Page generated in 0.03615 seconds