I canβt understand for life how to import javascript files into javascript under Rhino. Basically, all I want to do is import "some file.js" and be able to use things in the area there.
I am trying to interact with Context.currenctContext (compileString and compileReader), but I donβt understand how to get the corresponding Scope, and I continue to get the exception βCan't find the default value for the objectβ with this code:
Context.currentContext.compileString("print('something')", "whatever, 0, null).exec(Context.currentContext, null)
It seems pretty dumb if I can't create modules that I can then reuse in my javascript programs ... Does anyone know how to solve this?
source share