This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
7 Replies Last post: May 16, 2008 5:02 PM by Victor Gubin  
aheydler   4 posts since
May 5, 2008
Currently Being Moderated

May 5, 2008 8:37 AM

Xpcom.initialize (Xpcom.AWT) crashes linux jvm

Trying to run the JxBrowser demo under SLES10 crashes the JVM.

I have tried both Java 5 & 6 JVM's.

I have also tried to call the above method from my own code with the same result. GRE_HOME does point to xulrunner-linux.

 

A sample JVM log is attached.

 

Any suggestions?

 

ps If IntelliJ uses something like JxBrowser in its mozilla preview functionality then something has recently been fixed with the mozilla download since it used to also fail on my machine but it appears to work now.

 

pps I posted this in the Documents section by mistake if an admin would care to remove it.

Attachments:
Victor Gubin TeamDev Ltd. 116 posts since
Dec 17, 2007
Currently Being Moderated
1. May 7, 2008 12:51 PM in response to: aheydler
Re: Xpcom.initialize (Xpcom.AWT) crashes linux jvm

IntelliJ uses the JxBrowser library for mozilla preview functionality.

 

1. At first does you have got the Gtk2 v.2.10 installed in your system?

2. Can you run the xulrunner without the java code on your machine? To do this go to xulrnner-linux folder and type ./xulrunner

Victor Gubin TeamDev Ltd. 116 posts since
Dec 17, 2007
Currently Being Moderated
3. May 7, 2008 12:52 PM in response to: aheydler
Re: Xpcom.initialize (Xpcom.AWT) crashes linux jvm

Actually 1.8 xulrunner it the latest stable version of xulrunner  based on Mozilla 2.0 engine. 

New JxBrowser 1.0 uses the newest version of Mozilla engine Gecko 1.9 I.e. xulrunner 1.9pre (latest-trunk).

You can download it from ftp://ftp.mozilla.org/pub/xulrunner/nightly/latest-trunk/xulrunner-1.9pre.en-US.linux-i686.tar.bz2 .

The minimum system requirements of which you can see here  http://developer.mozilla.org/en/docs/Linux_Build_Prerequisites#Optional_Software   

So try to update your gtk

Victor Gubin TeamDev Ltd. 116 posts since
Dec 17, 2007
Currently Being Moderated
5. May 6, 2008 4:21 PM in response to: aheydler
Re: Xpcom.initialize (Xpcom.AWT) crashes linux jvm

Unfortunately we can not utillize FireFox 3 as an engine for JxBrowser becouse features of FF. 

Xulrunner is an optimum solution. However instaling of  FF3 package will automatically settle all relationships for xulrunner 1.9  therefore you can ask your clients to install FF3 for correctly work your applications with JxBrowser library and it will be optimum. However in majority of modern Linuxes such problems does not take a place, an exception is only Debain. 

 

Actually if property of GRE_HOME not set Xpcom.initialize throws an exception with the message "GRE_HOME system variable not set".

Victor Gubin TeamDev Ltd. 116 posts since
Dec 17, 2007
Currently Being Moderated
7. May 16, 2008 5:18 PM in response to: aheydler
Re: Xpcom.initialize (Xpcom.AWT) crashes linux jvm

Cannot load native JNIWrapper library (libjniwrap.so) mean no JNIWrapper native library in java.library.path system property.

 

See ReadMe.txt file from root folder of JxBrowser distribution to fix you problem.

     

Such errors can be easily processed using something like this:

 


        try { 
            Xpcom.initialize(Xpcom.AWT);
        } catch(Throwable t) {
            if( (t.getMessage().contains("(libjniwrap.so)")) ||
                (t.getMessage().contains("(libjniwrap.dll)") ) )
            {
                System.setProperty("java.library.path","<path to libs>"); // JxBrowser/bin folder is default
            } else {
                t.printStackTrace();
            }
        }

 

More Like This

  • Retrieving data ...