From: Roedy Green on
On Wed, 23 Dec 2009 02:03:25 -0800 (PST), warrior
<chandu.kushi(a)gmail.com> wrote, quoted or indirectly quoted someone
who said :

>1) how to convert c struct to java classes
see http://mindprod.com/project/readc.html
http://mindprod.com/project/structreaderamanuensis.html

>2) How do i code the function pointers wriiten in c to java?
see http://mindprod.com/jgloss/delegate.html
http://mindprod.com/jgloss/callback.html

--
Roedy Green Canadian Mind Products
http://mindprod.com
If you think it�s expensive to hire a professional to do the job, wait until you hire an amateur.
~ Red Adair (born: 1915-06-18 died: 2004-08-07 at age: 89)
From: markspace on
warrior wrote:
> 1) how to convert c struct to java classes


Use a class. Consider giving it public members to mimic the
accessibility of C structs, but also consider giving it private
variables and public accessors and mutator methods.


> 2) How do i code the function pointers wriiten in c to java?

The easiest is to just use the reference to the object, which you
already have. All objects in Java that you deal with are actually
"pointers" (references) anyway, you have no choice but to use a "pointer."

In some instances, you may wish to define an interface or use
reflection. This sounds a bit advanced for you right now, I'd try the
reference described above first.