How to debug through Java code and JNI with native code in c or c++ ?

Discussion in 'Java' started by jin zhang, Oct 2, 2004.

  1. jin zhang

    jin zhang Guest

    I am trying to debug a system writen by java and C++ code.
    They are connected by JNI of java.
    I am using the visual studio .net to do the project.
    The entry of the program is in java part, and I believe that the bug
    code is in C++.
    Are there anyway to debug this thing without writing a individual
    running file for the c code?
    Thank you very much.
     
    jin zhang, Oct 2, 2004
    #1
    1. Advertisements

  2. jin zhang

    Chris Uppal Guest

    jin zhang wrote:

    > The entry of the program is in java part, and I believe that the bug
    > code is in C++.
    > Are there anyway to debug this thing without writing a individual
    > running file for the c code?


    Yes, VS allows you to debug DLLs that have been loaded by an external
    application. From VS's point of view, java.exe is just another program that
    loads the DLL you create with your JNI code, so you tell it that you want to
    debug your DLL, and that it is going to be executed by the external program
    <wherever>\java.exe.

    See the VS help for details (try searching for "debugging DLLs").

    -- chris
     
    Chris Uppal, Oct 2, 2004
    #2
    1. Advertisements

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. Jabel D. Morales - VMan of Mana

    Problems with JNI: calling a Java method from native method.

    Jabel D. Morales - VMan of Mana, Aug 1, 2003, in forum: Java
    Replies:
    1
    Views:
    5,297
    Joseph Millar
    Aug 1, 2003
  2. bigbinc

    Java, jni.h and native method

    bigbinc, Oct 10, 2003, in forum: Java
    Replies:
    1
    Views:
    1,437
    Gordon Beaton
    Oct 10, 2003
  3. Replies:
    16
    Views:
    1,171
    Chris Uppal
    Apr 6, 2006
  4. Replies:
    13
    Views:
    6,752
  5. Replies:
    3
    Views:
    644
    Lawrence Kirby
    Feb 28, 2005
  6. kepptenkuck
    Replies:
    2
    Views:
    840
    kepptenkuck
    Apr 24, 2008
  7. Martijn Tonies

    JNI and event listeners in native code?

    Martijn Tonies, Oct 28, 2008, in forum: Java
    Replies:
    1
    Views:
    745
    Roedy Green
    Oct 30, 2008
  8. bgabrhelik
    Replies:
    0
    Views:
    1,168
    bgabrhelik
    Sep 29, 2009
Loading...