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

B

Brian Whitney

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top