i know i can write c++ back end and use xul(runner) as the front end but can i use java as back end and still use xul as front end ( executing java code ) ?
2 Answers
With XULRunner you can use java classes right from your javascript code. So simply try this:
var str = new java.lang.String('Test string');
alert(str);
This behavior is available automatically thanks to LiveConnect feature of java plugin.
If you want to load your existing java library you'll have to play with classloader, for more details see my blog:
-
http://jdk6.java.net/plugin2/liveconnect/ (LiveConnect is at-least something good). – Dec 29 '11 at 07:56
You can always make an java backend which uses eg. RPC calls between the java backend and the XULrunner front end. Zimbra desktop is such and example.
Here is a small overview : http://www.zimbrablog.com/blog/archives/2009/04/zimbra-desktop-no-light-no-air.html
More info here : http://www.zimbra.com/products/desktop.html
It's free to download and the source is availible : http://wiki.zimbra.com/index.php?title=Building_Zimbra_using_Perforce#Building_Zimbra_Desktop

- 623
- 3
- 7
-
Zimbra doesn't make use of XUL directly, they simply use Mozilla Prism to "desktopify" an ajax web application. – ordnungswidrig May 11 '09 at 13:29
-
That's true. But when/if you want to use another language as backend it doesn't have to make much difference. – lithorus May 12 '09 at 04:37