• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I use java class in other languages

 
Andrew Romanenco
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All

I have java class which I want to use in other system (for example delphi). I would like to use class as COM or DCOM object. This will allow using it in any windows application.
I have found a lot of bridges, but they allow access to com/dcom objects from java. Not to java classes as COM.

Could anybody give me a link?

Thanks
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You certainly can call Java from other languages. However, because Java code is not native code, you can't call it directly. You have to invoke a JVM then ask it to run Java code. You want the Invocation API, which is part of Java Native Interface (JNI).

There may be ready-made products to help you to do this, and to make your Java classes look like DCOM objects, but I don't know of these, since I wouldn't want to do any DCOM.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For PHP people, php-java-bridge is there.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for "java com bridge" and find many free and commercial products. I think most would have to flow from Java calling COM to get hooked up.

Also read up on JNI. You could make a COM object that talks to Java that way. Again, you'd have to fire up the JVM and get the JNI hooked up before you could call them from an MS language.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic