Clean JNI on new core

@kneth @bmunkholm