7 Replies Latest reply: May 15, 2014 9:56 AM by Steve Bromley RSS

    Monarch via COM in Java

    Steve Bromley

      I'm researching the interface of Monarch into one of our Java applications using the COM-Bridge provided by IBM's Alphaworks on their website.

       

      I do have the Monarch Programmers guide and have been trying to translate between Visual Basic and Java.  To obtain the Monarch Object I need to load against "Monarch32".  Is that an actual object, and if so, where does it exist? If not, what is the actual object name that is contains it.

       

      I am using Monarch 6.01

        • Monarch via COM in Java
          Gareth Horton

          Steve

           

          Monarch32 is the registered COM name of Monarch and is what you need to invoke it, i.e.

          in VB:

           

          Set oMyMonarchObject = CreateObject("Monarch32")

           

          This is registered with COM, which looks to the Monarch executable to perform the relevant tasks.

           

          If you search the registry for Monarch32 you will see the COM entries there.

           

          Remember that the Monarch executable will actually load to perform the tasks required, it is not like calling functions from a DLL.

           

          Hope this helps

           

           

          Gareth 

           

          Originally posted by Steve Bromley:

          I'm researching the interface of Monarch into one of our Java applications using the COM-Bridge provided by IBM's Alphaworks on their website.

           

          I do have the Monarch Programmers guide and have been trying to translate between Visual Basic and Java.  To obtain the Monarch Object I need to load against "Monarch32".  Is that an actual object, and if so, where does it exist? If not, what is the actual object name that is contains it.

           

          I am using Monarch 6.01 /b[/quote]

          • Monarch via COM in Java
            Steve Bromley

            It helps some.  Does anyone have a working example of this?  An example would wou

             

            I am not familiar with C++ and COM programming.

            • Monarch via COM in Java
              Steve Bromley

              Gareth,

               

              When I explore some DLL's with the Java-Com bridge program, I see methods that can be exposed via that tool. 

               

              I have explored all the objects in the Monarch/Programs directory looking for something that will expose the methods that I need and haven't been able to find any object that contains the necessary methods.

               

              What object should I be looking at that would contain the necessary methods?

               

              Steve

              • Monarch via COM in Java
                Nick Osdale-Popa

                I believe the file at

                C:Program FilesMonarchProgrammonarch.tlb

                 

                exposes all the methods/properties of Monarch.

                • Monarch via COM in Java
                  Steve Bromley

                  Thank you for the response.  The JavaCom Bridge program doesn't see anything inside that either. 

                   

                  Has anyone successfully gotten Monarch to work via COM from Java? If so, how?

                   

                  I don't want to continue to beat my head against a wall if I am attempting something that isn't going to work.

                  • Monarch via COM in Java
                    Gareth Horton

                    Steve

                     

                    I tried the proxy generator with the latest Java Com bridge app (bridge2java.exe from IBM and it worked fine.

                     

                    I used the tlb that Nick referred to in a previous post.

                     

                    It generated 2 files,

                    _DMonarch.java

                    Monarch.java

                     

                    I don't know what these do, as I am not a Java programmer.

                     

                    I can e-mail them to you if you like.

                     

                    Gareth

                     

                    Originally posted by Steve Bromley:

                    Thank you for the response.  The JavaCom Bridge program doesn't see anything inside that either. 

                     

                    Has anyone successfully gotten Monarch to work via COM from Java? If so, how?

                     

                    I don't want to continue to beat my head against a wall if I am attempting something that isn't going to work. /b[/quote]

                    • Monarch via COM in Java
                      Steve Bromley

                      I would love to see what results you received.  I did not get any _DMonarch.java file. 

                       

                      Could you please send them to:

                       

                      sbromley@erac.com[/email]