4 Replies Latest reply: Nov 10, 2006 9:21 AM by 843804 RSS

    STAY AWAY FROM ACTIVEX BRIDGE

    843804
      No kidding... at least If you are developing a business application, then my general advice is:
      STAY AWAY FROM ACTIVEX BRIDGE...Don�t use it to embed Swing in ActiveX. It is an incomplete, faulty technology... and I hope Sun is really ashamed of this feature with such a lousy documentation and so many bugs they never seem to fix...

      The choice of using the public JRE is just ridiculous.. imagine two applications, one using ActiveX bridge for Jre1.4 and another one using 1.5; they can not be installed on the same machine at the same time... and this idea that you have to install your application under C:\Program files\jre... the idea seems to be "different applications mixed together in one folder"...(well, you can change the path to your jar(s) in the registry after the dll has been registered...but then you get a security error..)

      and you never know what jre the users have installed on their machines... just think about it... what if the user upgrades the public jre on his/her machine...??? the new JRE installation will lack your application, even if is only a service pack upgrade... and if it is a new major release the bridge may not be backward compatible..(as was the case for 1.4 / 1.5)

      to use the public jre should be an option, not a requirement...

      And as you must have noticed.. ActiveX Bridge is full of BUGS that Sun apparently don�t care to fix...

      See the following posts:
      http://forum.java.sun.com/thread.jspa?threadID=570316&messageID=3008844#3008844
      http://forum.java.sun.com/thread.jspa?threadID=599029&messageID=3920693#3920693

      You could also log in to the Bug Database and search for open bugs related to the "Java PlugIn", subcategory "bridge"... Heaps of very old bugs still having status "open".

      So be wise. If you only need to invoke COM/ActiveX objects, use JACOB: http://sourceforge.net/projects/jacob-project/

      If you need to embed Swing GUI in ActiveX, try to look for other solutions than ActiveX Bridge. Maybe investigate the possibility of having embedded SWT instead of embedded Swing. And hey, swt is supposed to be able to embed swing... I don�t know, but it COULD work..? Anyone?

      If Sun wont fix ActiveX Bridge in Mustang, it is not a bridge, it's a dead end. SO don�t waste your time on it. Enough people have done that already.
        • 1. Re: STAY AWAY FROM ACTIVEX BRIDGE
          843804
          I agree with you, but I don't agree with the conclusion.

          The bridge is indeed a toy for children.

          However whatever the problem, it can be solved (at least by me and the sun documentation). I have been migrating an application using the bridge in 1.3 into 1.5. It lasted 4 days, and i've send 2/3 more bugs in the bugs database (none have been solved yet). So, as I state often, the bridge was bad, and the new version made it worse. I have particularly enjoyed the bug in which, a boolean returned in VB is neither true nor false.
          In this case, Sun and Microsoft share the culpability of this bug.
          Microsoft because VB is a loosy language, and sun because they don't test even the most simple primitive return types.

          The access problem is a result of the use of a change in the security policy (same as a plugin) in the bridge.

          ok, the bridge is really a mess, but I can deal with it, I can deal with all versions of windows, I can deal with the lack specifications.. so a bridge, even uncomplient with its specs, even not backward compatible, is not such a big deal to cope with.
          • 2. Re: STAY AWAY FROM ACTIVEX BRIDGE
            843804
            But does your application require more than the applet sandbox permissions?
            My application did, and according to the specification, activex does not run inside the applet sandbox...all permissions are granted

            But I got problems with the look and feel which could not be changed to windows look and feel, and the gui did not always respond to keyboard events...

            And i had to rename the activex\lib folder which is created when i register the dll... (and manually update the registry) because this is a known bug workaround...

            but the problem then was that the applet sandbox security was turned on... and i could not read files, username etc...

            so i had to manually grant permissions in the JRE policy file...

            and still i had a lot of problems because of strange bugs... i dont remember the details, i am just so happy i realized how stupid i was spending time on this terrible activex technology...
            • 3. Re: STAY AWAY FROM ACTIVEX BRIDGE
              800556
              See an article:
              http://codeproject.com/cpp/OOJNIUse.asp
              • 4. Re: STAY AWAY FROM ACTIVEX BRIDGE
                843804
                does anyone know if there is a roadmap for the ActiveX Bridge, and/or if there have been any changes on the ActiveX Bridge in Java 6.0 ?