Re: Using JAVA inside VBA
On 5/12/2013 5:02 AM, Chris Uppal wrote:
Ghislain wrote:
I have a compiled commercial jar that I want to use in VBA, something
Unforunately, I can't convert the API to a COM object. As far as I know,
it was possible 10 years ago but it is no longer possible unless you use
commercial products (like EZJCom).
Do you have any ideas ?
Buy the commercial product ?
Wrap the JAR up in an executable that makes the API available over TCP/IP, and
then create a COM object that uses that network interface ?
If you are capable of developing simple COM objects in C++, then it might be
simpler to use something like Jace:
http://code.google.com/p/jace/wiki/Overview
to create JNI-based wrapper code that your COM-server layer can talk to.
Open Office / Libre Office used to be able to talk to Java, as I understand it.
Maybe they still can, and it would be easier for you to use your existing
commercial component with one of them.
OOo/LO use UNO and there is an UNO binding for Java.
And it would very difficult to remove as certain parts of OOo/LO are
written in Java.
If you have the remarkably good sense, not to mention good fortune, to be a
Smalltalk programmer, then you could use Dolphin Smalltalk (which can generate
COM objects) + my very own (advt.) JNIPort to bridge between COM and Java...
But buying the commercial product seems the best bet to me. After all, you've
already paid for the two products you want to connect, why baulk at paying for
the bridge too ?
You get lots of money by not spending them.
:-)
Arne