Subj : Re: LiveConnect javascript supports java.io.File but not FileReader? To : netscape.public.mozilla.jseng From : Martin Honnen Date : Tue Jul 22 2003 02:42 pm Simon Taylor wrote: > Thanks to everyone who has offered help. > > We're still unable to run the get a LiveConnect script to work using the > FileReader object. (it fails for some other Java classes also, but I'm > focussing on FileReader for the sake of simplicity). > > I have one report from someone who says that the script does work for > him with JRE 1.4.2 on Windows XP Prof. However, it won't work for us in > any of the environments we've run it in, including Windows XP Prof (2002 > Service Pack 1). > > Does anyone know of anything *new* in the environment that has to be set > up in order for the full LiveConnect functionality to work? > > In our tests, we are using the following line in the users pref.js file: > > user_pref("signed.applets.codebase_principal_support", true); > > is that *all* that needs to be done? > > Here is a summary of the platforms we've tested on, the code only works > for us in Netscape 4.x > > Fails in: > Windows XP Prof/Mozilla 1.4/JRE 1.4.2 > Windows 2000/Mozilla 1.4/JRE 1.4.2 > Red Hat Linux 8.0/Mozilla 1.4/JRE 1.4.2 > > Works in: > Windows XP Prof/Netscape 4.x/JRE 1.4.2 > Windows 2000/Netscape 4.x/JRE 1.4.2 > Red Hat Linux 8.0/Netscape 4.8/JRE 1.4.2 > > Once again, I would be delighted to hear anyone's opinion. I think one problem you run into is that netscape.security.PrivilegeManager with Mozilla is no longer capable of requesting privileges for Java code, at least that is my understanding. The PrivilegeManager is solely for requesting privileges for JavaScript code. As for accessing files you might be able to achieve that without the use of Liveconnect Java calls but by using XPCOM after requesting UniversalXPConnect privileges. -- Martin Honnen http://JavaScript.FAQTs.com/ .