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.
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
Attempting to run xulrunner appears to fail with the same fault
andreas@ah-server:/usr3/Libraries/TeamDev/JxBrowser/xulrunner-linux.orig> ./xulrunner
./run-mozilla.sh: line 131: 19562 Floating point exception"$prog" ${1+"$@"}
Installed gtk version:
andreas@ah-server:/usr3/Libraries/TeamDev/JxBrowser/xulrunner-linux.orig> rpm -qa | grep gtk
gtk2-2.8.11-0.15
gtksourceview-1.5.6-18.2
gtk2-themes-0.1-653.2
gtk-1.2.10-907.11
gtkspell-2.0.11-20.11
gtkhtml2-3.10.0-15.15
gtk-engines-0.12-982.4.1
gtk-sharp2-2.8.3-43.10
python-gtk-2.8.2-21.2
gtk2-engines-2.6.7-17.2
So I suppose I have to try to update gtk... although I am curious as to why mozilla preview in IntelliJ runs OK on the same machine.
Its also interesting that the latest 1.8 download of xul from mozilla appears to run OK
andreas@ah-server:/usr3/Libraries/TeamDev/JxBrowser/xulrunner-linux.moz> ./xulrunner
Mozilla XULRunner 1.8.0.4
Usage: xulrunner OPTIONS
xulrunner APP-FILE http://APP-OPTIONS...
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
OK, thanks for that.
Can I make a couple of suggestions.
1) consider making it possible to use FF3 as the xul engine when it is released since it will be more manageable to get clients to install this package than trying to update individual libraries
2) if GRE_HOME is not set stop the Xpcom event thread from getting stuck in a loop with class not found errors, ie if you call Xpcom.initialize () with GRE_HOME not set then detect this and not attempt to initialise.
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".
Thanks for the explanation.
With regard to the exception when GRE_HOME is not set... yes the exception is thrown, however if shutting down the application is not an option you are left with a thread doing this...
2008-05-07 08:05:41,862 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c - Cannot load native JNIWrapper library (libjniwrap.so).
java.lang.UnsatisfiedLinkError: Cannot load native JNIWrapper library (libjniwrap.so).
at com.jniwrapper.Library.loadNativeCode(SourceFile:78)
at com.jniwrapper.Library.loadNativeCode(SourceFile:103)
at com.jniwrapper.Library.ensureNativeCode(SourceFile:113)
at com.jniwrapper.Library.load(SourceFile:122)
at com.jniwrapper.Library.getFunction(SourceFile:257)
at com.jniwrapper.Library.getFunction(SourceFile:275)
at com.teamdev.a.b.h.(SourceFile:18)
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:41,875 main ERROR cdc.dispense.app.Dispense - Browser initialisation fails, exception java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: GRE_HOME doesn't exist
2008-05-07 08:05:41,917 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,020 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,120 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,224 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,320 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,420 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,522 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,618 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,719 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,818 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:42,918 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,018 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,118 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,218 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,318 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,418 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
2008-05-07 08:05:43,518 XpcEventThread ERROR com.teamdev.xpcom.impl.awt.c -
java.lang.NoClassDefFoundError
at com.teamdev.xpcom.impl.awt.AwtLinuxPlatform$b.runOneIteration(SourceFile:20)
at com.teamdev.xpcom.impl.awt.f.run(SourceFile:73)
at com.teamdev.xpcom.impl.awt.d.run(SourceFile:43)
at java.lang.Thread.run(Thread.java:595)
Process finished with exit code 143
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();
}
}