first, some information on my setup:
- linux ubuntu 64 bits
- java 1.6.0_16 (jre, and jdk, installed from the package manager)
but let's start from the beginning :
I first tried my code in a 'basic' xulrunner application, ie. only a directory structure with an application.ini, no makefile, booted from the command line with the xulrunner executable installed in my linux system: It worked! I could see my java applet (put in an HTML page..) inside the xulrunner app: yeepee!
Then, I tried to use the mozilla build scripts to build a standalone application :
after hours of head scratching and js/css/xul/xml coding,
I installed:
- xulrunner-1.9.1.5 (standard package, and the dev package)
- hg clone from mozilla 1.9.1 stable, which I use to get the mozilla build files (you know.. this 'client?mk' which I couldn't find anywhere, other than the mozilla repository. am I doing it wrong? I guess.. not too much, because it seems to work, but I'm not sure)
I put in my mozconfig:
Code: Select all
# Options for client.mk.
mk_add_options MOZ_BUILD_PROJECTS="myapp"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../myappbase/obj-@CONFIG_GUESS@
#mk_add_options MOZ_MAKE_FLAGS=-j2
# Global options
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-logging
ac_add_options --disable-tests
ac_cv_visibility_pragma=no
# myapp options
ac_add_app_options myapp --enable-application=myapp
ac_add_app_options myapp --with-libxul-sdk=/usr/lib/xulrunner-devel-1.9.1.5
#java ---- I tried with and without these options
ac_add_options --with-java-include-path=/usr/lib/jvm/java-6-sun/include
ac_add_options --with-java-bin-path=/usr/lib/jvm/java-6-sun/bin
I ran it with a "make -f client.mk build", and my standalone application got compiled,
with a basic XUL UI (buttons, tabs) working too: yeepee!
But now, when I try to embed my Java Applet inside a XUL panel, things get worse..
Here how I load the applet from XUL (I took inspiration from a tutorial explaining it form flash, and my old html code) :
Code: Select all
<html:object classid="java:NiceVisualEffect.class" type="application/x-java-applet" archive="effects.jar">
...
</html:object>
Here is the error:
Code: Select all
Didn't find JVM under /home/jbilcke/checkouts/git/myapp/myappbase/obj-x86_64-unknown-linux-gnu/myapp/dist/bin/xulrunner/plugins
myapp-bin: ../../../../src/plugin/solaris/plugin2/common/JavaVM.c:104: InitializeJVM: Assertion `foundJVM' failed.
I tried various things, but the error is always the same :
- This "plugins" folder already contains a libjavaplugin.so, and sure, a JVM is installed in my machine!
- I tried to manually copy additionnal files inside this "obj-x86_64-unknown-linux-gnu/myapp/dist/bin/xulrunner/plugins" directory:
I made a copy of : libnpjp2.so, libjavaplugin_jni.so
(they were inside my JRE library, installed in the system)
and I tried to copy them in this "obj-x86_64-unknown-linux-gnu/myapp/dist/bin/xulrunner/plugins",
but without success.
- I tried some options in the mozconfig (java dir..)
- I tried to modify the java settings path, through the chrome user preferences : no success too
In fact this is always the same error message (no JVM found inside xulrunner/plugins)
anyone experienced the same issues?
thanks in advance for your help!