Link to home
Start Free TrialLog in
Avatar of joegood
joegood

asked on

Java Beans

Is it possible to use a JavaBean in a C++ application?
Do you know where I can get an example?
Avatar of prashant_n_mhatre
prashant_n_mhatre



There tools to package existing C++ objects as Java Beans and vice versa (the code is compiled as a dynamic link library (dll))

like

(1) VisualAge for Java C++ Access Builder

http://www7.software.ibm.com/vad.nsf/data/document2453?OpenDocument&p=1&BCT

(2) cxxwrap
http://www.execpc.com/~deaven/Dave/Software/cxxwrap/

You may use them.
Avatar of joegood

ASKER

can you also use these C++ JavaBeans in Unix? (shared object library)

can you use a JavaBean in a C++ application?
cxxwrap is supported on Unix platform also. VisualAge ?...I have no idea. I never used it but my friends don't talk in favor of it.

Vice versa should not be a problem.
Avatar of joegood

ASKER

can you also use these C++ JavaBeans in Unix? (shared object library)

can you use a JavaBean in a C++ application?
Avatar of joegood

ASKER

One last question and then I will give you the 300 points.
Can you treat these JavaBeans like objects?

Example
class Foo
{
  Foo();

  void Fx() { cout << "fx" << endl; };
  void Fy() { cout << "fy" << endl; };

};

can I use this class as an object in Java?

Example:
Foo foo;
foo.Fx();
foo.Fy();

Can I use a Java class/object in C++?

Thanks for your help and I promise to give you the points.
ASKER CERTIFIED SOLUTION
Avatar of prashant_n_mhatre
prashant_n_mhatre

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial