View Full Version : call public method in jar file?

10 May 2012, 1:45 AM
Are there any extjs examples of calling a public method in a jar file? tia,


10 May 2012, 8:58 AM
Can you be a little more specific about what you're trying to accomplish?

I ask because Extjs is Javascript and runs in the browser, where a JAR file usually lives serverside and has its internal Java classes executed by a web container.

10 May 2012, 4:00 PM
darn - just received reply from Sakuli that says I cannot call their jar with javascript :-( This is what I need to do:

- midi controller (Tascam US 2400 - 24 moving faders sends midi information to Sencha using javascript midibridge classes
- Sencha displays midi information and javascript manipulates it
- Sakuli (mouse automation program like Automate or AutoIt gets info from Sencha and clicks, drags etc on commercial music app e.g. Ableton Live. Sakuli has a jar with public methods as well as an IDE.

Although Ableton Live is fully functional midi aware, some features are manual - specifically dragging a loop from OS file directory into a slot to play. I need to fully automate this process so there is no human mouse waving needed :-)

Converting my business apps from Adobe Flex to html5/js with Sencha Architect - really loving it. Although Adobe Air is meant to communicate with a jar (have not got that working yet), the js midi is meant to be superior and I would love to do all this with Sencha. I did see something that said that javascript could call a public jar function using AJAX so I am not taking Sakuli's "No" just quite yet.

10 May 2012, 9:36 PM
well - you have to put this jar as a library dependency in a java web-server - then make a facade to it, which you can call for e.g. via REST... to which server-part system are you currently communicating?

11 May 2012, 12:35 AM
have Apache installed at the moment but can add Tomcat. Just got this back from Sakuli: "Using XML-RPC, I have made a Safari extension, that is able to trigger a script on the local machine. The scripts are run by an XML-RPC server, that is written in Sikuli script and is simply waiting for requests in the background and dispatch them to Sikuli script functions.
This principally works, but depending on Browser you have to deal with XSS (cross site scripting) problems. I got it to work a year ago on Safari and IE, but not on FF or Chrome." (note to self: google xml-rpc server :-) )