Nuxeo JS client : is it possible to use it in java 8 Nashorn console?
The problem is that nuxeo.js requires jQuery, and trying to load jQuery requires browser environment (like “window” object).
Any solution? What do you think about this approach? Thanks.
jjs> load('node/nuxeo.js'); node/nuxeo.js:1 ReferenceError: "require" is not defined
loading "lib/jquery/nuxeo.js" succeeds, but fails later when executing client connect.
We have no plan yet to make nuxeo.js work directly in Nashorn. As it's only a
XMLHttpRequest, so even if we remove the
jQuery dependency, we won't be able to make any call.
You best bet, as Antoine Cordier suggested, is to try running it through Node.js.