Reputation: 5185
Is it somehow possible to write active-x component on Java?
Any library, tutorial and samples will be helpful
Thank you
Upvotes: 1
Views: 1210
Reputation: 8926
I would be careful with using EZJCom since it can be a source of many memory-leaks (at least as of version 1.8). The native code in this library often creates global JNI references to Java objects. Some of the references are never removed which pins down the object forever and prevents it from being garbage collected. I've seen a lot of such cases, eg. COM event listeners, ActiveXObjectContainers and sometimes even pure Java event listeners that were added to ActiveXObjectContainer. Although I reported the issue to developer, the feedback I got was far from satisfactory, ie. I didn't get any resolution. Because of this I had to make ugly workarounds on Java-side to mitigate the problem.
Upvotes: 1
Reputation: 20618
If you want to integrate it into a web page this is called a Java applet (sorry the Java applets website seems to be down right now). Otherwise you should maybe look at the Java Plug-in Technology page.
Upvotes: 0
Reputation: 328860
You probably look for Java COM Bridge:
Build a COM/ActiveX component for Java classes in 15 minutes
and
There are two directions using EZ JCom: Java to COM, and COM to Java [...] You give it Java classes and pick some methods and fields, and it will give you a COM component that can be easily used by VB, C# or C++.
Note that I couldn't find an example for "build COM components" :-/
Upvotes: 0
Reputation: 37524
The closest you'll get to it is the Java-ActiveX bridge:
http://download.oracle.com/javase/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
Upvotes: 1