Invoke Java Method Error

Method cannot be Invoked

I downloaded the example on the UiPath page below and it works. However I tried to invoke a method on another .jar file and it did not. So what we did was modify the code by adding a very simple method and compiled it. Not only did the new method not work but the one that was called before did not. So the conclusion is that something went wrong when compiling. Maybe I should ask how do you compile the jar file on its own independent of being in a project? I will pass this on to the developer as I do not know java.

Invoke Java Method Example

Difficult to say whats going wrong without to know the Java version. There a Java files that are build with a checksum to prevent anybody else from modifiying this file or adding code for security (#virus) reasons. If this file/library will be opend from the engine to execute the code, the checksum is checked. If this check fails it will not run. May be that in your case it would be better to create your own file and leave the original as is. Your function can now be found in your lib.

Thanks Martin for your suggestion however we started with a simple jar that was written as a test with a couple of methods and we cant get it to work. We took the downloaded file sample and just changed the jar file path, and the Invoke Method pkg and method called. It wouldn’t work.