Creating an array in a pre allocated address

Gabriel Bianco gabriel.bianco@pixeon.com.br
Tue Jan 29 18:07:00 GMT 2008


I found out what the problem was. I use Marco's 4.1.1 gcc build ( 
http://jnc.mtsystems.ch/ ).
Apparently, he made a mistake in this build. His distribution of 
libgcj-4.1.1.jar contains
this class, but the header file is nowhere to be found.
I guess his build didn't create the headers for any inner classes or 
classes not defined in
their own files. After using gcjh on them, everything works.
Thanks for the help, Tom.
Gabriel Bianco escreveu:
> I can't get that to work here. I included 
> 'java/nio/DirectByteBufferImpl.h' and 'gnu/gcj/RawData.h'.
> It shows this error message:
> error: expected type-specifier before 'DirectByteBufferImpl$ReadWrite'
>> I tried including 'java/nio/DirectByteBufferImpl$ReadWrite.h' but it 
> doesn't exist.
> I'm on gcc 4.1.1 here. Could that be the reason or should the class be 
> there?
>> Tom Tromey escreveu:
>>>>>>> "Gabriel" == Gabriel Bianco <gabriel.bianco@pixeon.com.br> writes:
>>>>>>>>>>> Gabriel> I think that in JNI I can do something similiar with
>> Gabriel> NewDirectByteBuffer(). Is there a function in CNI?
>>>> I suppose you could just do what the JNI code does:
>>>> using namespace gnu::gcj;
>> using namespace java::nio;
>> return new DirectByteBufferImpl$ReadWrite
>> (reinterpret_cast<RawData *> (address), length);
>>>> It might be a bit better to add a new CNI function to do this, then
>> have the JNI implementation call that. My reasoning here is that
>> perhaps we don't want to promise that the implementation details here
>> will change.
>>>> Tom
>>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /