JNI JVM invocation works in 1.3.1, but get NoClassDefFoundError in 1.4.2

Discussion in 'Java' started by Brian Whitney, Nov 5, 2003.

  1. I've spent a day reading posts from javasoft forums
    and Google groups on this topic, but no solutions have worked....

    The basic problem is that when I switch from using
    1.3.1 to 1.4.2, using the same EXACT CLASSPATH and
    code, I get a this when I run a C++ application that
    uses JNI to invoke the JVM:

    Exception in thread "main" java.lang.NoClassDefFoundError:
    xxx.yyy.myclass

    To switch from 1.3.1 to 1.4.2 I just change my JAVA_HOME and recompile
    everything. My application has worked fine for months under 1.3.1, but
    breaks with the exception using 1.4.2. I'm using third party jars that
    were not compiled under 1.4.2. Even though I have control over the JVM
    version I'm running, I tried -target 1.1 anyway, but it does not fix
    the problem using 1.4.2.

    I set 3 arguments to the options for JNI_CreateJavaVM:
    1) -Djava.class.path <my_classpath>
    2) -Djava.security.policy (all permissions granted)
    3) -Xusealtsigs
    I set the version to JNI_VERSION_1_4;

    Tried using JNI_GetDefaultJavaVMInitArgs to see default args to JVM,
    but as noted in other postings, this method does not fill in the init
    args structure.

    I am running everything on the same host and am running
    as an application, NOT an applet.

    Again, unless there is some new nuance in 1.4.2, this is NOT a
    classpath issue.

    Also, I'm running under Solaris.

    Any help on this would be greatly appreciated.
     
    Brian Whitney, Nov 5, 2003
    #1
    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:
    885
    Alex Hunsley
    Nov 4, 2003
  2. NB
    Replies:
    3
    Views:
    535
    Tor Iver Wilhelmsen
    Jul 31, 2004
  3. NB
    Replies:
    1
    Views:
    407
    Lothar Kimmeringer
    Jul 31, 2004
  4. Uri
    Replies:
    1
    Views:
    480
    Gordon Beaton
    Oct 21, 2004
  5. Replies:
    1
    Views:
    2,222
    Irmen de Jong
    Jun 22, 2004
Loading...

Share This Page