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. Advertising

  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. Advertising

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. bigbinc

    Java, jni.h and native method

    bigbinc, Oct 10, 2003, in forum: Java
    Replies:
    1
    Views:
    1,257
    Gordon Beaton
    Oct 10, 2003
  2. Replies:
    13
    Views:
    6,076
  3. Replies:
    3
    Views:
    397
    Lawrence Kirby
    Feb 28, 2005
  4. kepptenkuck
    Replies:
    2
    Views:
    699
    kepptenkuck
    Apr 24, 2008
  5. bgabrhelik
    Replies:
    0
    Views:
    803
    bgabrhelik
    Sep 29, 2009
Loading...

Share This Page