Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Writing JNI with JDT+CDT
Writing JNI with JDT+CDT [message #188433] Fri, 03 December 2004 09:50
Eclipse UserFriend
Originally posted by: akarypid.y-ah-oo.nospa/\m.com

Hi all,

Apologies for double-posting, but I wasn't sure whether I should post this
to the JDT or CDT group.

I have a Java application in which I am using JNI. Can JDT and CDT cooperate
to run javah and compile my C sources in one stoke? What is the best way of
setting this up?

What I've done is convert a Java project to a C project using the respective
CDT option for "new project". Therefore my project now has both Java and C
Natures. As a result, Java code is compiled from the Java builder (as
always) and I was also able to create a Makefile which runs javah and gcc
as appropriate. The only problem is that I have to manually invoke the
"all" Make target from the CDT "Make Targets" view to update the .h file
and re-generate the C library.

Is there a way to have CDT run make after every incremental JDT build? It
would generally do nothing unless I had edited the .java file with the
natives so it wouldn't really slow things down... Is there something I am
missing which can achieve this setup in a simpler fashion?

--
Alexandros Karypidis
Previous Topic:Sorting 'Qualifiers' section in "Open type" dialog
Next Topic:needs code snippet for ICompilationUnit javadoc promise
Goto Forum:
  


Current Time: Sat May 10 05:06:29 EDT 2025

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

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

Back to the top