Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to debug through Java code and JNI with native code in c or c++ ?

Reply
Thread Tools

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

 
 
jin zhang
Guest
Posts: n/a
 
      10-02-2004
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.
 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      10-02-2004
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI thread vs. native thread vs. JNI call bgabrhelik Java 0 09-29-2009 03:33 PM
JNI: Retrieve Java string from native code kepptenkuck Java 2 04-24-2008 03:58 PM
Java Native Interface: "Translate" java call to JNI ckirchho@directmedia.de Java 13 10-09-2006 04:52 PM
Riding JNI[Java Native Interface]: Java to C and back ws_dev2001@yahoo.com C Programming 3 02-28-2005 01:31 PM
Java, jni.h and native method bigbinc Java 1 10-10-2003 09:27 PM



Advertisments