JNI-invocation API problem - Java

This is a discussion on JNI-invocation API problem - Java ; Does anyone managed to launch a java VM from a MS VC++ application? I'm trying access my java classes from the C++ side, but I can't. The problem appears when invoking the method JNI_CreateJavaVM(..), that always returns -1. I've surf ...

+ Reply to Thread
Results 1 to 2 of 2

JNI-invocation API problem

  1. Default JNI-invocation API problem

    Does anyone managed to launch a java VM from a MS VC++ application?
    I'm trying access my java classes from the C++ side, but I can't. The
    problem appears when invoking the method JNI_CreateJavaVM(..), that always
    returns -1.

    I've surf the web and the fora, and I've tried all the solutions and
    different implementations I've found. In theory, the code is quite simple,
    and in this first step, I'm not loading any of my java classes but only
    starting a clean VM.

    My details are:
    VC++ in Visual Studio. NET
    Sun Java SDK 1.4.06

    One of my firsts doubts is: Do I have to use the jvm.dll that comes with the
    jre of the sdk, or I can simply use the jvm.lib ?
    Also, I suspect the problem comes from the fact that I have different VM in
    my computer, Can any of briefly explain me how does JNI finds and starts the
    VM?

    I haven't attached any code because I've tryied many different solutions.
    Thank to all of you in advance




  2. Default Re: JNI-invocation API problem

    lucas wrote:
    > Does anyone managed to launch a java VM from a MS VC++ application?


    Yes.

    > I'm trying access my java classes from the C++ side, but I can't. The
    > problem appears when invoking the method JNI_CreateJavaVM(..), that always
    > returns -1.
    >


    > I haven't attached any code because I've tryied many different solutions.


    Bad choice. Please pick one of your attempts, perhaps the simplest,
    and/or one that you most expected to work, and post it.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation

+ Reply to Thread

Similar Threads

  1. Async web method invocation
    By Application Development in forum CSharp
    Replies: 3
    Last Post: 10-02-2007, 12:58 PM
  2. Replies: 6
    Last Post: 04-23-2007, 05:52 AM
  3. EXTERNPROTO invocation problem
    By Application Development in forum vrml
    Replies: 3
    Last Post: 02-15-2006, 04:02 PM
  4. method invocation problem - Iona Orbix
    By Application Development in forum Java
    Replies: 1
    Last Post: 01-10-2006, 04:39 PM
  5. method invocation problem - Iona Orbix
    By Application Development in forum Object
    Replies: 1
    Last Post: 01-10-2006, 04:38 PM