For this I need to load code generated in GWT into a Nashorn engine.
This is not very easy since the load process of GWT libraries includes various ‘hacks’ which involve the DOM.
I don’t know yet how I am going to do this exactly. I found the gwt-node project. This project is meant to run GWT code on Node.js.
I think by working with the custom linker developed there (GwtNodeLinker.java) I might be able work something out.