• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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
  • 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.
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic