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

Java & Activex

 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oe of my collegue asked this question to me ..
Is it possible to access any Activex from a java code ?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you could write access methods with JNI, and run that code in an applet. Its a pretty stupid thing to do though. If you are using ActiveX its because you know you are supporting IE only - I'd ask your colleague why they want to do this.
 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do they want an ActiveX to be embedded inside an applet? I dont think that's possible because you need the windows handle to attach an ActiveX control.
Do they just want call ActiveX methods? they can do that through JNI. I have done that and it's pretty simple to do as long as you know C++ and COM
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Paul Sturrock:
I'd ask your colleague why they want to do this.



The requirement is as follows.
There is a VB activex that controls a hardware .. This guys needs his application to interact with that hardware ....
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jayesh Lalwani:

Do they just want call ActiveX methods? they can do that through JNI. I have done that and it's pretty simple to do as long as you know C++ and COM


Yes they need to call the methods in the activex control.
But tell me one thing how can Java be used to call a vb method using JNI.
I have heard abt this but dont know more ... Also i have writtern small small programs using JNI that calls a C++ method ..
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by srini vasan:

Yes they need to call the methods in the activex control.
But tell me one thing how can Java be used to call a vb method using JNI.
I have heard abt this but dont know more ... Also i have writtern small small programs using JNI that calls a C++ method ..



You can call a "VB" ActiveX control through any language that supports COM, which includes C++. Actually there is nothing like a VB activeX control. I think what you mean is an ActiveX control written in VB. Well, it doesnt matter what language the ActiveX control is written in, you should be able to call the ActiveX control from a JNI dll written in C++.

But, I wouldnt advise you to do that unless you have someone who has a pretty good working knowledge of C++ and COM. If you dont have someone who is an knowledgable in Windows and COM prgramming, then you have a pretty steep learning curve to get over
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic