returning a Collection with JNI

Discussion in 'Java' started by rmcalinden@gmail.com, Apr 14, 2005.

  1. Guest

    How do you return a Collection from a JNI method call in C++?

    normally, it's:

    jDataType = env->CallDataTypeMethod(jobject, jmethodID)

    but obviously there's none for CallCollectionMethod and there's no
    jCollection?

    Was thinking about returning and Object and casting it but not sure it
    can be cast to a c++ collection?

    thanks...
     
    , Apr 14, 2005
    #1
    1. Advertising

  2. On 14 Apr 2005 15:33:18 -0700, wrote:
    > How do you return a Collection from a JNI method call in C++?


    The same way as for every other type of object.

    > normally, it's:
    >
    > jDataType = env->CallDataTypeMethod(jobject, jmethodID)
    >
    > but obviously there's none for CallCollectionMethod and there's no
    > jCollection?


    No, there's CallObjectMethod() and jobject.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Apr 15, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley

    IBM's JNI fails where Sun's JNI works

    Alex Hunsley, Nov 3, 2003, in forum: Java
    Replies:
    4
    Views:
    862
    Alex Hunsley
    Nov 4, 2003
  2. Pasturel Jean-Louis

    Porting JNI Windows under JNI LINUX + Wine ?

    Pasturel Jean-Louis, Feb 29, 2004, in forum: Java
    Replies:
    5
    Views:
    925
    Pasturel Jean-Louis
    Mar 3, 2004
  3. vasanth
    Replies:
    0
    Views:
    2,728
    vasanth
    Jan 25, 2005
  4. vasanth
    Replies:
    0
    Views:
    629
    vasanth
    Jan 25, 2005
  5. Øyvind Isaksen
    Replies:
    1
    Views:
    1,001
    Øyvind Isaksen
    May 18, 2007
Loading...

Share This Page