JNI_createJavaVM always return JNI_ERR

I am using jdk1.5 and JNI_VERSION_1.4.
i am trying to create JVM as shown below
jint ret;
    char classpath[1024];
    JavaVMInitArgs  vm_args; /* VM initialization arguments */
    JavaVMOption options[1];
    sprintf(classpath, "-Djava.class.path=%s",USER_CLASSPATH);
    options[0].optionString = classpath;
    memset(&vm_args, 0, sizeof(vm_args));
    vm_args.version = JNI_VERSION_1_4; /* New in 1.1.2: VM version */
    vm_args.options = options;
    vm_args.nOptions = 1;
    vm_args.ignoreUnrecognized = JNI_TRUE;
    /* load and initialize a Java VM, return a JNI interface
     * pointer in env */
    ret = JNI_CreateJavaVM(&gJVM, (void**)&gJavaEnv, &vm_args);
    if (ret < 0)
    {
       dlogError("Can't create JVM. Error: %ld\n", ret);
       return;
    }

it always returns -1.  I have made my path to point to jvm.dll which in in jre/bin/client.  
what could be wrong?
LVL 1
ramalaksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ajay-SinghCommented:
> I have made my path to point to jvm.dll which in in jre/bin/client.

How did you do that?

It appears to me that its issue with jvm.dll

http://forum.java.sun.com/thread.jspa?threadID=656283
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.