How to take C++ struct in java class

HiMy requirement is c++ dll will invoke my java. C++ will pass struct to my java class, I have to take the struct values after i have to process the values and I will get bulk data, this bulk data i have to fill in c++ struct.Can you guide me how to do.Thanks,
[288 byte] By [lateef_shaika] at [2007-10-2 13:22:17]
# 1
http://java.sun.com/j2se/1.4.2/docs/guide/jni/
prometheuzza at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Hi,Thanks for your earlier response, I have gone throught some of the tutorials there I found for primitive data types, Can you please tell me how to map the c++ structure in java.Thanks,
lateef_shaika at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
you can map it to an object of a custom class
jsalonena at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

For instance :// C struct :

struct MyStruct {

charname[64];

longnbr;

};

// Java class :

class JMyStruct {

String name;

intnbr;

}

Regards

jfbrierea at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
Hi,Thanks for your response, And in java class i will get bulk of data about 25 different types of data as a output. Can you tell me how to pass this data to C++ application. If you are having sample code please send me.Thanks,
lateef_shaika at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6

If you want some code sample, at least post your C struct and the corresponding Java class.

Please paste your code between code tags exactly like this:

[code]

your code

[/code]

You can do that by simply pasting your code in the message area, highlight it and then click on the code button above.

You may read the [url http://forum.java.sun.com/help.jspa?sec=formatting]Formatting tips[/url] for more information.

Regards

jfbrierea at 2007-7-13 10:59:00 > top of Java-index,Java HotSpot Virtual Machine,Specifications...