Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] JNI Sample

I just committed a sample JNI implementation for a portion of what I'm writing to interface with the OMPI open runtime engine/environment (no one really knows what the E stands for :) ). JNI is so screwed up in Eclipse it's unreal. I added a HOWTO_PTP_JNI text file which explains how to generate the .h and .c files (which I committed) as well as how to build the .jnilib (OSX specific, will fix this later). Right now it requires a few commands being run on the command line and then a change to the Run.. bit in Eclipse to point it at the new .jnilib.

I havn't added a Makefile for this yet because, frankly, I'm not confident in mixing Java and C in the same project (I was able to just drop it in there, but in the past when I've added Makefiles to a Java project is bombs nonstop).

If someone has some magic for making this JNI transparent (in so far as compiling and creating the JNIlib) please offer it up or change up the source to make this non-hacky. I've spoken with a few mailing lists that use JNI and they claim there's no way to do it in Eclipse, that what I'm doing is the only way. <sigh> Gogo INTEGRATED development environment.

The JNI code in there is nothing but a helloworld but I have more 'real' JNI code that's 80% working, I just wanted to commit something that could hopefully stir an understanding for how to get JNI smoothly working inside of Eclipse.

--
-- Nathan
Correspondence
---------------------------------------------------------------------
Nathan DeBardeleben, Ph.D.
Los Alamos National Laboratory
Parallel Tools Team
High Performance Computing Environments
phone: 505-667-3428
email: ndebard@xxxxxxxx
---------------------------------------------------------------------



Back to the top