Prev: TFTP
Next: Time
From: Joseph M. Newcomer on
C and C++ POD (Plain Old Data) types are interchangeable. Essentially, if you want to use
something more complex, like std::vector, you would have to write a pice of code (most
likely C code, or using the C subsect of C++) that marshaled the Java data into the C++
representation. Arrays would require marshaling unless you had a class that implemented
the Java representation of the array so they were bitwise compatible. Since Java, as far
as I know, does not specify how arrays are implemented, the code would not be portable
across difference Java implementations (or even, perhaps, different releases of the Sun
Java product, since backward compatibility has NEVER been a consideration in their
releases)
joe

On Wed, 7 Apr 2010 00:02:19 -0700 (PDT), divya_rathore <divyarathore(a)gmail.com> wrote:

>For curiosity sake.. is there some tutorial around for using JNI with C
>++? Can you point it out for me?
>An old idea that remains unimplemented has following scenario:
>
>a given raw data array (could be unsigned char, int, float, double
>arrays defined in Java code) would be passed to a C++ dll. The dll
>processes/modifies that array and returns back to java app.
>
>thanks in advance,
>- Divya
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
First  |  Prev  | 
Pages: 1 2
Prev: TFTP
Next: Time