Nuxeo JS client : is it possible to use it in java 8 Nashorn console?

I'd like to use nuxeo.js in Nashorn javascript engine. The advantage is that it doesn't require to install node.js and can be used on any java8 VM 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.

0 votes

1 answers



It looks like the JS lib is also shipped for NodeJS. Did you try it ?


yes, trying to load "lib/node/nuxeo.js" fails :

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.


Hi. Googling around on the topic gives this (maybe) interesting result:


Thanks for your research. I'll post back if I find any interesting outcome in this topic.


We have no plan yet to make nuxeo.js work directly in Nashorn. As it's only a JavaScript engine, it does not support 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.

1 votes