cancel
Showing results for 
Search instead for 
Did you mean: 

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

promanov_
Star Contributor
Star Contributor

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.

1 ACCEPTED ANSWER

Thomas_Roger
Star Contributor
Star Contributor

Hi,

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.

View answer in original post

5 REPLIES 5

Antoine_Cordier
Star Contributor
Star Contributor

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

promanov_
Star Contributor
Star Contributor

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

Antoine_Cordier
Star Contributor
Star Contributor

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

Thomas_Roger
Star Contributor
Star Contributor

Hi,

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.

promanov_
Star Contributor
Star Contributor

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

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.