I am currently tasked with writing a custom browser for our company using the AxWebBrowser control, and I'm doing it in C#. It's working nicely, and I've got everything working according to their specs, save for one requirement: Choosing the java plugin at runtime, via a config setting.
I've got tons of XML config settings that I import and utilize within my browser. Using one of these parameters, I need to be able to tell the browser what plugin version to use at launch. I cannot rely on using CLSID or MIME types, since in this scenario, the HTML involved will all be handled by the clients.
I've tinkered with many things to try to find a solution here, but so far, I am hitting a brick wall. I have tried setting some Registry settings to see if I could enforce a specific java plugin when the browser launches, but if I am to tamper with the registry settings, I need to know exactly which ones to use, so it does not end up behaving like a cludgy hack, and possibly leave corrupted registry settings lying around.
I cannot rely on using the Java Plugin Control panel, since this should be done seamlessly, and programmatically according to my XML setting for the plugin. Each user that logs in to the terminal, will have their own config file, and this file gives the browser its environment settings (security settings, enable/disable scripts/activex, etc). I just need to know if this changing of the java plug-in is feasible, without having to use the control panel and without tampering with the HTML (since that is out of my control, and we cannot rely on or force the client to update their HTML code).
Any help/suggestions here would be very much appreciated. Even finding out that this can not be done would at least be a definitive answer (if it is indeed true).
[ September 12, 2006: Message edited by: Alfonso Franco ]
[ September 12, 2006: Message edited by: Alfonso Franco ] [ September 12, 2006: Message edited by: Alfonso Franco ]
posted 13 years ago
I really appreciate your feedback, but I'm not sure this is really related to what I'm needing. Ideally, if there were a set of registry settings, or other system settings I could configure upon my custom browser's launch that would ensure that any java applet would run with a specific plugin/jre environment, that is what I need to do. But, I do not have access to the HTML pages in question, since these would all be owned/maintained by our clients. And, parsing/tweaking the HTML on-the-fly doesn't seem to be working, since it causes the applet to not initialize.
Thanks for your input, but I'm not sure how these 'widgets' are what I need to get the job done.
posted 13 years ago
Mick I has been appreciated his feedback Ok. I did understand what do you want to do with the plugin setting without touch the HTML . Let's me clear something I will continue working with you to find this setting into this website with the java applet configured to a plugin there existing . Please tell me about this idea Mick .. give me more details from yours browsers
I cannot rely on using the Java Plugin Control panel,
But that's just the point - the selection of which JVM/plugin to use is determined by settings made in the control panel. It seems that you need to eperiment with the registry settings that are affected by the control panel (I have no idea which those are), and then try to alter them to get the desired effect. This article How to read the Windows Registry shows how to later the registry from Java code.
Need have more confirmation Mick Thanks Francojava
posted 13 years ago
Ahh, yes. I had thought that was all that was going on behind the scenes - do you know of a good way (perhaps a small freeware app) that I can 'watch' the registry while performing updates in the plugin? If there were a utility to give me a 'diff' of the registry, I could see exactly what all is getting changed. I know that Sun's documentation mentions a couple of registry settings, but I truly don't think that it only updates those 2 keys - I think there is more going on.
As a side note, I've also noticed that when you install the 1.5.0_xx build of the JRE (SDK or not), it takes over ALL of the CLSID registry entries that are in the format "CAFEEFAC-00xx-000x-00xx-ABCDEFFEDCBA". My assumption is that they felt very sure that 1.5x will sufficiently run all applets built in previous versions - and it may well do so seamlessly. But since I've specifically been given this task, I have to rely on testing between other versions to see if the W3C standard (using this CLSID attribute) works properly. Even the 1.6 beta allows one to use previous versions of the plugin, but not 1.5 - at least not in my experience thus far.
Anyway, if anyone has a reccomendation of a utility I could use to easily snapshot the registry before and after using the Plug In control panel, and get a 'diff' of what has changed, I'd appreciate that! In the meantime, I'll go looking for one myself.