Hi all, I am trying to run a simple XUL application through Java, using JavaXPCOM.
I have built XULRunner (on my Mac), and have added MozillaInterface.jar to my Java application's classpath. I can get my GREPathm and the initEmbedding method works fine. Up to here everything works. Now, I have a XUL application located at /Users/myname/[...]/chrome/ content/mybrowser.xul. I've copied-and-pasted the Mozilla initialization/embedding code and locationProvider from http://developer.mozilla.org/en/docs/JavaXPCOM:Embedding_Mozilla_in_a_Java_Application_using_JavaXPCOM, and I've added the application-opening code from that page as well. According to the site that that code came from, I'm supposed to modify LocationProvider so that it returns the chrome folders of my app and of XUL.Framework. So here are the only lines I've changed: In my main class: nsIDOMWindow win = windowWatcher.openWindow(null, "chrome://test/ content/mybroswer.xul", "mybrowser", "chrome,resizable,centerscreen", null); In LocationProvider: public File[] getFiles(String aProp) { File[] files = null; if (aProp.equals("APluginsDL")) { files = new File[1]; files[0] = new File(libXULPath, "plugins"); } else if (aProp.equals("ChromeML")){ files = new File[2]; files[0] = new File("/Users/sfentress/Applications/MozillaTest/ MyBrowser.app/Contents/Resources/chrome/"); files[1] = new File("/Users/sfentress//sources/mozilla/obj-i686- apple-darwin8.8.2/dist/XUL.framework/Versions/1.8.0.4/chrome/"); } return files; } When I run this, nothing happens. Ok, a little more specifically, if I have the LocationProvider print out what it's being requested, I gives me the following (when windowWatcher.openWindow is called) get file: CurProcD, [false] get file: GreD, [false] get files: ChromeML get files: SkinML get file: UChrm, [false] get file: ProfD, [false] get file: ProfLD, [false] So obviously something is happening, but whatever it is, it's not starting my xul application. How can I get my xul application to run? Is there a problem with my paths? OpenWindow is being called on a relative path -- how does the program know where it is? Should I change the chrome.manifest in any way? Any advice or pointers would be extremely appreciated. Thanks! Sam _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding