Solved

Java Beans

Posted on 2001-06-19
6
194 Views
Last Modified: 2010-04-17
Is it possible to use a JavaBean in a C++ application?
Do you know where I can get an example?
0
Comment
Question by:joegood
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:prashant_n_mhatre
Comment Utility


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.
0
 

Author Comment

by:joegood
Comment Utility
can you also use these C++ JavaBeans in Unix? (shared object library)

can you use a JavaBean in a C++ application?
0
 
LVL 4

Expert Comment

by:prashant_n_mhatre
Comment Utility
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.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:joegood
Comment Utility
can you also use these C++ JavaBeans in Unix? (shared object library)

can you use a JavaBean in a C++ application?
0
 

Author Comment

by:joegood
Comment Utility
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.
0
 
LVL 4

Accepted Solution

by:
prashant_n_mhatre earned 300 total points
Comment Utility
You can always use interfaces (public methods) but on
unix platform (gcc compiler - I know..others I do not) it is partially supported.

Have a look at
http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01483.html

for detailed information.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now