I know this comment doesn't directly address your immediate JNI needs, but here goes - sorting an array in java is easy - in fact, the algorithm is already written for you. I'd like to hope there is...