JVM invocation with JDK1.4 using JNI

Discussion in 'Java' started by Uri, Oct 21, 2004.

  1. Uri

    Uri Guest

    Uri, Oct 21, 2004
    #1
    1. Advertising

  2. On 21 Oct 2004 01:41:27 -0700, Uri wrote:
    > I am trying to run the code from:
    > http://www.codeguru.com/Cpp/misc/misc/interfacingtootherlanguages/article.php/c405/
    > With JDK1.4 but it fails in the method: "JNI_CreateJavaVM". (return
    > value -1)


    The example uses the 1.1 version of the JNI argument struct, which
    changed in 1.2.

    http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html#JNI_CreateJavaVM

    Note that when you use the newer struct (described in the JNI
    documentation), you don't need to call JNI_GetDefaultJavaVMInitArgs(),
    and you should use the symbolic values for the version identifier
    (e.g. JNI_VERSION_1_4).

    Also make sure that you compiled your application with support for
    multiple threads, and that the shared libraries belonging to the JVM
    itself can be bound by the application at runtime. Exactly how you do
    these things depends on your platform and your compiler.

    /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, Oct 21, 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. Brian Whitney
    Replies:
    0
    Views:
    597
    Brian Whitney
    Nov 5, 2003
  2. Michal M
    Replies:
    7
    Views:
    825
    Andrew Thompson
    Aug 2, 2005
  3. Replies:
    3
    Views:
    5,233
    Bjorn Abelli
    Mar 30, 2006
  4. manzur
    Replies:
    5
    Views:
    520
    Chris Uppal
    Nov 9, 2006
  5. Replies:
    0
    Views:
    742
Loading...

Share This Page