This week's book giveaway is in the Java 9 forum. We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line! See this thread for details.
I have just starting working with Nashorn and things have been working well until I tried to make a asynchronous service - implmented in Java and called from a script. My service receives a script function which is to be called-back sometime later. The function passed to my service is an anonymous function, and I can't figure-out how it can be called from Java.
I've spent an hour or so poking around at this, and I can see anyway to do it -- most likely my approach is wrong and I should be looking at doing this differently. Any suggestions?