Search:

Type: Posts; User: Dwere13

Search: Search took 0.16 seconds.

  1. Re: How to call a C sort function to sort a Java Array.

    Think you could tell me a bit more about JNA? I just emailed my mentor about it, and researched it a bit on wikipedia. After my explanation about using a Java Front-end with a C back-end do you think...
  2. Re: How to call a C sort function to sort a Java Array.

    Instead of GetIntArrayRegion could I do GetIntArrayElements? and also ReleaseIntArrayElements? and if not, to release it then would I do ReleaseIntArrayRegion?
  3. Re: How to call a C sort function to sort a Java Array.

    Thanks helloworld,

    So instead of what you quoted me saying, should it be:

    JNIEXPORT jint JNICALL Java_JavaArray_MergeSort
    (JNIEnv *env, jobject obj, jintArray arr, jint low, jint mid, jint...
  4. Re: How to call a C sort function to sort a Java Array.

    I know sorting an array in Java is easy. Because I'm unsure what level of clearance my actual project has, I can't fully explain anything to you. What I can say is this: There is an open source...
  5. Re: How to call a C sort function to sort a Java Array.

    That is MergeSort.c, and I've never had to create it with the same name as the java file. And my instructions was just a typo, I meant to write down .c not .java. Anyway, my MergeSort.C program is...
  6. Re: How to call a C sort function to sort a Java Array.

    Read the instruction file that I posted in my original post.

    Specifically, these instructions. And for creating a HelloWorld program, and a couple of other simpler math programs (addition...
  7. Re: How to call a C sort function to sort a Java Array.

    Compiling in the manner that I do, the only other file created is my library file - libMergeSort.so (I'm using linux). And currently, that's not being created because my program will not compile...
  8. Re: How to call a C sort function to sort a Java Array.

    Sorry, my .c bridge file?

    My current .h file is:

    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class JavaArray */

    #ifndef _Included_JavaArray...
  9. Re: How to call a C sort function to sort a Java Array.

    Nope still got the same errors.

    Now, the C code I had posted had "jint low, jint mid, jint high" in it, and the java code has the same. However when I compile the Java code, and do javah -jni...
  10. Re: How to call a C sort function to sort a Java Array.

    Well, mentioning the JavaArray.h file made me take a look at some things so I changed my Java code a tiny bit. I appreciate your comments. :)

    JavaArray.java now looks like:

    class JavaArray {
    ...
  11. Re: How to call a C sort function to sort a Java Array.

    Yeah I've read that, aussiemcgr, I actually found a link to that page in another thread on this forum. And it DID in fact help me significantly getting my Hello World stuff to work the other day. ...
  12. How to call a C sort function to sort a Java Array.

    My name is David, I'm interning this summer doing some High Performance Computing work. I'm significantly out of my comfort zone here; I am primarily a network/network security geek, not a...
Results 1 to 12 of 12