That code is auto generated by Oracle forms when a java class is imported. I couldn't find much documentation on the JNI methods but here is a link where Oracle talks a little bit about that:
It says: You can conveniently access the imported Java through the generated PL/SQL using the new ORA_JAVA package and its built-ins. Internally, the generated PL/SQL packages use the Java Native Interface (JNI) standard.
I double checked the arguments and all. Nothing seems wrong. I am in a very bad situation as there isn't any documentation available on the JNI methods used in this code.