Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Need Help Running Eclipse to debug C/C++ when running JNI(How To Debug Java and C/C++ Simulataneously in Eclipse)
Need Help Running Eclipse to debug C/C++ when running JNI [message #1783778] Fri, 16 March 2018 19:56
Jim Anderson is currently offline Jim AndersonFriend
Messages: 74
Registered: October 2014
I'm developing software largely in Java, but I have some old code written in C that I would like to call from Java. Currently, I'm bringing myself up-to-speed on using JNI. I have written java code to call the C code and can run the program from the command line. The JNI calls run, but there are obvious errors in the results. I would like to step through the code in Eclipse.

I have installed the CDT plugin into Oxygen (Eclipse 4.7) and I can run the code in Eclipse. I can set breakpoints in java and step through code, but I cannot stop in the C code.

I found a bit of guidance at [url=[/url], but that thread addresses running in an android environment, which I am not doing. I was encouraged to see this in the thread:

I'm resurrecting this comment to note that Java code can be debugged at the same time as Native JNI code. To do so, start by Debugging as an Android Native Application. Next attach to the Android process in the ADT Devices tab (select process, and click the green bug icon). Breakpoints in both Java and C++ code will now be hit. Not quite seamless, but close enough. Piklor Aug 22 '14

My problem at this point is that when I run my java project, I see only, "Run As A Java Application", but I have no option to run as a native application. I'm not sure where to look next, but I am still searching. Can anyone point me to documentation that will help or suggest how to get Eclipse to stop in the C/C++ when debugging?

Jim A.
Previous Topic:Minimum "Install New Software" for learning Java
Next Topic:Oxygen javascript syntax coloring
Goto Forum:

Current Time: Tue Sep 29 02:40:22 GMT 2020

Powered by FUDForum. Page generated in 0.02776 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top