JNI callback and jar

Discussion in 'Java' started by Mic, Feb 12, 2004.

  1. Mic

    Mic Guest

    Hi all,

    I have been dragged with this problem for 3 days... I wrote
    a JNI bridge function that does call back to a function
    inside a callback class. The java application is archieved
    in a jar fiile...

    location -
    caller in jar: one\two\three\caller.class
    callback in jar: one\two\three\callback.class

    To be able to callback at the JNI, FindClass need to locate
    the callback class... so the class name is passed by using
    its "full qualified" name, as I thought...

    "one.two.three.callback"

    However, FindClass returns NoClassDefFoundError

    I have tried to set the classpath environment...


    MiC
     
    Mic, Feb 12, 2004
    #1
    1. Advertising

  2. On Thu, 12 Feb 2004 20:09:39 GMT, Mic wrote:
    > To be able to callback at the JNI, FindClass need to locate
    > the callback class... so the class name is passed by using
    > its "full qualified" name, as I thought...
    >
    > "one.two.three.callback"
    >
    > However, FindClass returns NoClassDefFoundError


    When you invoke FindClass, you need to spell the classname like this:

    (*env)->FindClass(env,"one/two/three/callback")

    i.e. don't use dots like in your example.

    This can only be a guess. Next time, post real code!

    /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, Feb 13, 2004
    #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. Arnold Peters
    Replies:
    0
    Views:
    588
    Arnold Peters
    Jan 5, 2005
  2. muttley
    Replies:
    0
    Views:
    2,732
    muttley
    Oct 20, 2005
  3. cyberco
    Replies:
    4
    Views:
    3,777
    Roedy Green
    Feb 14, 2006
  4. Arnold Peters
    Replies:
    0
    Views:
    672
    Arnold Peters
    Jan 5, 2005
  5. KWhat4
    Replies:
    3
    Views:
    1,213
    red floyd
    Oct 10, 2007
Loading...

Share This Page