File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes JNI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JNI" Watch "JNI" New topic


Thomas White
Ranch Hand

Joined: Feb 01, 2003
Posts: 32
Hello Everyone,
I have JNI problem pertaining to a C++ file compilation.
Let me start with what I have:
I have a java program that implements JNI:

I also have the header file Timex.h:

and I have the .cpp file time_clock.cpp:

I compiled the java program file, create the .h file fine, then I go to compile time_clock using the following commands:
g++ -fpic -I c:\j2sdk1.4.1_03\include
-I c:\j2sdk1.4.1_03\include\win32
I get a long list of error messages not pertaining to time_clock.cpp but pertaining to the code in jni.h and jni_md.h. I've never tampered with these files. Could they have gotten messed up some how, could they be deprecated? I'm confused. Any help would be greatly appreciated.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Without seeing the errors you get, I can only suggest that they may be due to the fact that you are not using a microsoft compiler.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: JNI
It's not a secret anymore!