I have written some java code in an adapter in worklight project. when i m trying to call the java method, i am getting an error saying
"responseID":"6","errors": {Ecma Error: TypeError: Cannot call property downloadFile in object JavaPackage java.classes.FileIOPlugin]. It is not a function, it is \"object\".}
I have followed the procedure exactly stated in the following link. Using Java in Adapters
this is my project structure. Is there something wrong with this structure or should i add anything more to this?
This is how i am trying to call the java non-static method in adapter-impl.js
function downloadFile() {
var fileInstance = new com.worklight.JavaCode.FileIOPlugin();
return
{ result: fileInstance.downloadFile(); };
}