JNI_EVERSION returned when specifying JNI_VERSION_1_6

Anytime I try to create a JVM from C++ code specifying JNI_VERSION_1_6 the return code from JNI_CreateJavaVM is JNI_EVERSION...indicating an invalid version.Is anyone else seeing this or can confirm this? Is this a known problem?
[243 byte] By [huffrg3a] at [2007-11-26 12:21:24]
# 1
It works fine for me.
jfbrierea at 2007-7-7 15:12:57 > top of Java-index,Archived Forums,Socket Programming...
# 2

Hmm...ok, well that's good to hear. I must be doing something wrong then...I'm essentially doing everything I was doing when I was working with Java 1.4.x to start the JVM from cpp:

JavaVMInitArgs vm_args;

JavaVMOption * options = new JavaVMOption[1];

options[0].optionString = "-Djava.class.path=.";

vm_args.version = JNI_VERSION_1_6;

vm_args.options = options;

vm_args.nOptions = 1;

vm_args.ignoreUnrecognized = false;

res = JNI_CreateJavaVM(&m_jvm, (void**)&m_env,&vm_args);

Yet now I'm getting this -3 returned. I am linking with jvm.lib in the jdk 6 directory, and I am using the includes from the jdk 6 directory. Any idea what I'm doing wrong?

huffrg3a at 2007-7-7 15:12:57 > top of Java-index,Archived Forums,Socket Programming...
# 3

I should probably clarify that the "real" problem I am having is that when I compiled a class with javac version 1.6.0, FindClass("MyClass") failed.

Simply compiling the class with javac version 1.4.x or 1.5.x would fix this problem. I thought the problem had to do with the fact that I was specifying JNI_VERSION_1_4 for my JVM instead of JNI_VERSION_1_6, so then I went this route...and can't even create a JVM.

Any help is appreciated, thanks!

huffrg3a at 2007-7-7 15:12:57 > top of Java-index,Archived Forums,Socket Programming...
# 4

Maybe at runtime it tries to load the 1.4 jvm.dll?

Make sure that your Path environment variable has the appropriate jdk 6.0 folder set for jvm.dll (JDK6_HOME\jre\bin\client).

For instance on the command line:

> set Path=c:\jdk1.6\jre\bin\client;%Path%

> your_executable.exe

Regards

jfbrierea at 2007-7-7 15:12:57 > top of Java-index,Archived Forums,Socket Programming...
# 5
Doh! Thanks...forgot about that....I thought I had all my bases covered, but I KNEW I was leaving something out.
huffrg3a at 2007-7-7 15:12:57 > top of Java-index,Archived Forums,Socket Programming...