JavaBeans ActiveX Bridge for Java 8?

2019-02-19 09:28发布

问题:

There used to be a JavaBeans ActiveX Bridge but AFAIK this is no longer supported under Java 8.

I want to call my JavaBeans from Excel, so what is the way to go with Java 8?

The problem is I have some legacy JavaBean packaged in a dll that I use from Excel VBA. I don't have the source code to this bean. But I still want to use it with Java 8/9. Is this possible?

回答1:

I solved the problem using Obba: I read the Java bean with a Java parser and generated a VBA wrapper method for each Java method that I want to call. The wrapper calls the original Java method using Obba. I created a VBA class containing all the wrapper methods and use it to access the bean from my VBA code.

The Java ActiveX bridge would have spared me the work of creating the VBA wrapper class.