Tweaking API for JNITasks.