5 Replies Latest reply: Jun 25, 2007 6:48 AM by 843804 RSS

    VC++ calling Java


      I have a VC++ code want to call my Java stand-alone application. After browsing through Google, I learnt about many third party packages such as JIntegra. I worked on their example and got a basic VC++ application calling a Java component by registering Java code as a type library with Windows and making it accessible as a COM object through VC++ IDE.

      Problem with JIntegra is they want $$$ as it expires after 60 day evaluation period. On a further lookup, I read some text which said that making this Java application based on an EJB architecture...you can get this up working fine. Now is it true that Active X Bridge for JavaBeans is an efficient way to have VC++ call Java ?

        • 1. Re: VC++ calling Java
          well, i don't know if the bridge is "efficient" (whatever that means), but it's a nice solution to wrap java beans (and therefore java applications) into ActiveX DLLs and use them in your VC/VC and whatever Windows language having access to ActiveX.
          • 2. Re: VC++ calling Java
            Go to:


            This is a nice Java-COM bridge with a fairly generous license. You can use it in any free or commercial application. The only restriction is that the commercial application cannot be an IDE for Java. I've used it successfully on some custom COM dlls that I've wrtten on Win32.

            Also check out:


            This is a little Java application that reads in your COM dlls .tlb files and generates a wrapper class for that COM library. It's fairly nice for simple COM interfaces but breaks quickly on complicated ones. If that happens you may have to resort to writing your own wrapper classes.

            All this advice assumes you have a working knowledge of COM on Win32. If you do then you have my sympathy.

            • 3. Re: VC++ calling Java
              I beleive your advice is for calling COM components from within a Java application. What I am looking for is to generate a wrapper around my Java application and register it as an Active X / COM component which can be called by VC++ IDE. JACOB is Java-to-COM only and not bidirectional.

              I shall try making my GUI based application based upon Java Beans. Lets see...

              Thanks for your information,

              • 4. Re: VC++ calling Java
                Depending on the complexity of the interaction, it may be easier to use JNI...

                - K

                I shall try making my GUI based application based upon
                Java Beans. Lets see...

                Thanks for your information,

                • 5. Re: VC++ calling Java
                  I have the same problem - from VC++ code - calling Java code. Can anybody tell me a simple solution for this ?