Buggy code:
else { length = C . strlen ( ptr ) ; byte [ ] buffer = new byte [ length ] ; C . memmove ( buffer , ptr , length ) ; mozillaPath = new String ( MozillaDelegate . mbcsToWcs ( null , buffer ) ) ; if ( ( mozillaPath . indexOf ( "xulrunner" ) ) == ( - 1 ) ) { IsXULRunner = false ; } else { mozillaPath += ( Mozilla . SEPARATOR_OS ) + ( delegate . getLibraryName ( ) ) ; path = MozillaDelegate . wcsToMbcs ( null , mozillaPath , true ) ; rc = XPCOMInit . XPCOMGlueStartup ( path ) ; if ( rc != ( XPCOM . NS_OK ) ) { IsXULRunner = false ; mozillaPath = mozillaPath . substring ( 0 , mozillaPath . lastIndexOf ( Mozilla . SEPARATOR_OS ) ) ; if ( Device . DEBUG ) System . out . println ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>as<seq2seq4repair_space>XULRunner:<seq2seq4repair_space>" + mozillaPath ) ) ; } } } } if ( IsXULRunner ) { Mozilla . XPCOMInitWasGlued = true ; } } } C . free ( greBuffer ) ; } if ( IsXULRunner ) { if ( Device . DEBUG ) System . out . println ( ( "XULRunner<seq2seq4repair_space>path:<seq2seq4repair_space>" + mozillaPath ) ) ; try { Library . loadLibrary ( "swt-xulrunner" ) ; } catch ( UnsatisfiedLinkError e ) { SWT . error ( ERROR_NO_HANDLES , e ) ; } byte [ ] path = MozillaDelegate . wcsToMbcs ( null , mozillaPath , true ) ; int rc = XPCOM . XPCOMGlueStartup ( path ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; Mozilla . error ( rc ) ; } Mozilla . XPCOMWasGlued = true ; mozillaPath = mozillaPath . substring ( 0 , mozillaPath . lastIndexOf ( Mozilla . SEPARATOR_OS ) ) ; } else { if ( ( style & ( SWT . MOZILLA ) ) != 0 ) { browser . dispose ( ) ; String errorString = ( ( mozillaPath != null ) && ( ( mozillaPath . length ( ) ) > 0 ) ) ? ( "<seq2seq4repair_space>[Failed<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>detected<seq2seq4repair_space>XULRunner:<seq2seq4repair_space>" + mozillaPath ) + "]" : "<seq2seq4repair_space>[Could<seq2seq4repair_space>not<seq2seq4repair_space>detect<seq2seq4repair_space>registered<seq2seq4repair_space>XULRunner<seq2seq4repair_space>to<seq2seq4repair_space>use]" ; SWT . error ( ERROR_NO_HANDLES , null , errorString ) ; } int ptr = C . getenv ( MozillaDelegate . wcsToMbcs ( null , MOZILLA_FIVE_HOME , true ) ) ; if ( ptr != 0 ) { int length = C . strlen ( ptr ) ; byte [ ] buffer = new byte [ length ] ; C . memmove ( buffer , ptr , length ) ; mozillaPath = new String ( MozillaDelegate . mbcsToWcs ( null , buffer ) ) ; } else { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , "<seq2seq4repair_space>[Unknown<seq2seq4repair_space>Mozilla<seq2seq4repair_space>path<seq2seq4repair_space>(MOZILLA_FIVE_HOME<seq2seq4repair_space>not<seq2seq4repair_space>set)]" ) ; } if ( Device . DEBUG ) System . out . println ( ( "Mozilla<seq2seq4repair_space>path:<seq2seq4repair_space>" + mozillaPath ) ) ; if ( Compatibility . fileExists ( mozillaPath , "components//libwidget_gtk.so" ) ) { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , "<seq2seq4repair_space>[Mozilla<seq2seq4repair_space>GTK2<seq2seq4repair_space>required<seq2seq4repair_space>(GTK1.2<seq2seq4repair_space>detected)]" ) ; } try { Library . loadLibrary ( "swt-mozilla" ) ; } catch ( UnsatisfiedLinkError e ) { try { Library . loadLibrary ( "swt-mozilla-gcc3" ) ; } catch ( UnsatisfiedLinkError ex ) { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , e , ( ( "<seq2seq4repair_space>[MOZILLA_FIVE_HOME='" + mozillaPath ) + "']" ) ) ; } } } if ( ! ( Mozilla . Initialized ) ) { Mozilla . LocationProvider = new AppFileLocProvider ( mozillaPath ) ; Mozilla . LocationProvider . AddRef ( ) ; String tempPath = System . getProperty ( "java.io.tmpdir" ) ; File componentsDir = new File ( tempPath , "eclipse//mozillaComponents" ) ; Mozilla . LocationProvider . setComponentsPath ( componentsDir . getAbsolutePath ( ) ) ; InputStream is = Library . class . getResourceAsStream ( "//external.xpt" ) ; if ( is != null ) { if ( ! ( componentsDir . exists ( ) ) ) { <START_BUG> componentsDir . mkdir ( ) ; <END_BUG> } int read ; byte [ ] buffer = new byte [ 4096 ] ; File file = new File ( componentsDir , "external.xpt" ) ; try { FileOutputStream os = new FileOutputStream ( file ) ; while ( ( read = is . read ( buffer ) ) != ( - 1 ) ) { os . write ( buffer , 0 , read ) ; } os . close ( ) ; is . close ( ) ; } catch ( FileNotFoundException e ) { } catch ( IOException e ) { } } int [ ] retVal = new int [ 1 ] ; nsEmbedString pathString = new nsEmbedString ( mozillaPath ) ; int rc = XPCOM . NS_NewLocalFile ( pathString . getAddress ( ) , 1 , retVal ) ; pathString . dispose ( ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; Mozilla . error ( rc ) ; } if ( ( retVal [ 0 ] ) == 0 ) { browser . dispose ( ) ; Mozilla . error ( NS_ERROR_NULL_POINTER ) ; } nsIFile localFile = new nsILocalFile ( retVal [ 0 ] ) ; rc = XPCOM . NS_InitXPCOM2 ( 0 , localFile . getAddress ( ) , Mozilla . LocationProvider . getAddress ( ) ) ; localFile . Release ( ) ; if ( rc != ( XPCOM . NS_OK ) ) { browser . dispose ( ) ; SWT . error ( ERROR_NO_HANDLES , null , ( ( ( ( "<seq2seq4repair_space>[MOZILLA_FIVE_HOME<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>point<seq2seq4repair_space>at<seq2seq4repair_space>an<seq2seq4repair_space>embeddable<seq2seq4repair_space>GRE]<seq2seq4repair_space>[NS_InitEmbedding<seq2seq4repair_space>" + mozillaPath ) + "<seq2seq4repair_space>error<seq2seq4repair_space>" ) + rc ) + "]" ) ) ; } System . setProperty ( Mozilla . GRE_INITIALIZED , "true" ) ; if ( IsXULRunner ) { System . setProperty ( Mozilla . XULRUNNER_PATH , mozillaPath ) ; } }

Fix:
componentsDir . mkdirs ( ) ;