PDA

Click to See Complete Forum and Search --> : COM and Java


Sam Finch
Aug 18th, 2000, 07:27 AM
How easy is it to create COM objects (like VB Class modules) in java? I don't care how to do it BTW I just want to know how easy it is.

Sam Finch
Aug 18th, 2000, 07:40 AM
What about standard dlls as well. If not can you create any sort of code component in java, I am aware you can make something called an applet which is a bit like an ActiveX control, can you make them without a user interface, and can you use them in VB?

kb244
Aug 18th, 2000, 08:34 AM
If you are using Microsoft VJ++, you can easily create Com/ActiveX controls or dll like you would in most other microsoft languages, once compiled, it will work in any of the microsoft language, VB, VC++, VFP, etc. With VJ++ you can also use your java knowledge to create Native Windows programs instead of classes that require Java VM.

Sam Finch
Aug 18th, 2000, 09:47 AM
Is that just VJ++, what about other versions of Java?

We're writing a program and we want people to be able to write their own Plug ins (not plug ins in the normal sense but plug ins is close enough without going into anneccasery detail)

Seeing as we want to write ours in VBand we want other people to use VB we were looking at COM to do it, or standard dlls for C programmers, what's the best way to cater for java programmers?

parksie
Aug 18th, 2000, 01:30 PM
For Java, without using VJ, there is very little possibility of making a COM server. However, Java does support CORBA, which is platform-independent (like COM is supposed to be). Unfortunately, there are no IDL->VB converters because VB does not support OOP features properly. VB7 should address this.

Sam Finch
Aug 18th, 2000, 01:57 PM
Great, so there is no way of using java components in VB, what about using VC++ to interface it into a standard dll or COM object?

kb244
Aug 18th, 2000, 03:02 PM
Thus far when speaking of VB, or VC++, you are speaking of platform specifics, to actually create a dll, more likely activeX, being platform specific, I would just go with VJ++, since it will create ActiveX Dlls and controls that will work in any Microsoft or ActiveX supporting language, of course at the same time this defeats the purpose of Java, it's platform independance, and portibility, the good side is though is that you wont exactly have to relearn a language concept to create platform dependent software in VJ++.

noone
Sep 14th, 2000, 09:57 PM
This may be a bit too late for you but I came across this article about a Java-COM bridge from Sun:
http://www.asptoday.com/articles/20000804.htm

lengwai
Sep 2nd, 2003, 10:31 PM
Hi Guys,

I've wrote a simple dll using J++. And now i am wondering how to use it. Quite a joke isn't it ??

Can I instantiate a constant using certain values? For example in Java.

Animal mammals = New Animal("Warm Blood", "Birth");

If i were to compile Animal Class into a dll. How do I instantiate this mammals constant in VB?

I don't think the below willl work.

public mammals as New Animal("Warm Blood", "Birth")

Thanks.

dave

CornedBee
Sep 4th, 2003, 01:38 AM
The Java equivalent of ActiveX controls is the Java Bean. It is far easier to create than an ActiveX control and in addition it is platform independent (it's Java). There also is some DLL that exposes Java Beans as if they were ActiveX controls, though I don't know how well that works.

I recommend not to use VJ++, as it is no longer under development and only supports a very early version of Java (1.1 I think).