Bookmark Topic Watch Topic
  • New Topic

CPU Time  RSS feed

aymane chetibi
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello all,

I have to find cpu time consumed by a java program.
I did not find any other way but using JNI.
and I am getting some problems with it.

Please if you know any other simpler method let know, if not can you try to see where is the error in what I have done !

I created a java class:
that looks like this:

Compiled it into CPUJavaTest.class

then created a header file using: javah -jni CPUJavaTest == > (CPUJavaTest.h)


Then I fount that I have to write a C code that implements the function, I did the following:

Then compiling this code does not work.
I have to create a library from this code.
CAn you pleaaaaase help me with getting this code compiled. I compiled it on both Windows and Linux and it does not work.

It gives me some errors both on the C file and on the header file.

Thank you.
Joe Ess
Posts: 9436
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question in multiple forums, especially since there is already an active discussion on the other thread. Crossposting can lead to confusion and duplication of effort as the community tries to help everyone.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!