• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How can I use java class in other languages

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For PHP people, php-java-bridge is there.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic