view native code from Eclipse

前端 未结 1 760
青春惊慌失措
青春惊慌失措 2021-01-12 15:29

I have a java application which makes use of native method calls.Is there a way to view this code in eclipse? I can get the source code for this native library, but do not k

相关标签:
1条回答
  • 2021-01-12 16:32

    Not a full answer, but Eclipse does have C/C++ IDE functionality

    Here is some information (though it seems a bit dated): Information on CDT/JDT integration

    Info on creating JNI code from inside Eclipse (look at the very last post)

    It does seem like an integrated debugging experience would be well within Eclipse's capabilities, but it's obviously not hyper important.

    OK - all that said, I do have a recollection of getting Visual C++ debugger to work with a Java application that was making JNI calls... It's been awhile, but I'm pretty sure you can connect the C++ debugger to the running Java application using the pid. Then set a breakpoint, and rock and roll (you'll obviously have to compile the JNI library as a debug module).

    It wasn't a fully integrated experience, but it was pretty effective. I try to write my JNI code as thin wrappers around the native calls, though, so I spend very little time debugging my JNI calls.

    0 讨论(0)
提交回复
热议问题