Accessing functions from Java Generics

Attention: “JS Nashorn Comparator” Version 1.0 had an unforeseen bug! :warning:

Apparently, Nashorn can’t “see” objects’ non-public members! :ghost:

Therefore, both the class MyVec and its fields x, y, z had to be explicitly declared as public in order for Nashorn’s code to access them. :roll_eyes:

Otherwise, the field x would be undefined inside Nashorn’s callback function! :grimacing:

Issue is fixed now under version 1.1! :space_invader:

1 Like