Problem with a custom monitor, I can not invoke the .jar file

I'm doing a custom monitor, in which, I'm going to use a .jar file, but I do not know how to invoke it from the javascripts console.

I'm doing a custom monitor, in which, I'm going to use a .jar file, but I do not know how to invoke it from the javascripts console. And I do not know how to capture in the javascripts code console the result of my .jar file

Can someone help me with this please?