views:

75

answers:

3

IS there a way to use a ocx control ( VB6) from Java?

A: 

The only approach I know of is through JNI, which is a bumpy road.

Commercial offerings like http://www.ezjcom.com/ provide tooling support for this, so it is easier to work with.

Thorbjørn Ravn Andersen
A: 

Haven't done this myself, but have a look at the Java Native Interface "JNI". http://download.oracle.com/javase/6/docs/technotes/guides/jni/

del.ave
+1  A: 

Here are some links of Java/COM bridges.

http://sourceforge.net/projects/jacob-project/
http://javacombridge.com/
http://sourceforge.net/projects/j-interop/
http://java2com.com/ http://j-integra.intrinsyc.com/

The last one has a lot of samples using their bridge, you might be able to either use their product or get ideas on how to do the Java part if you are going to roll your own.

You can also wrap your own using JNI.

Romain Hippeau