with jshell, is there a way to create variables in the scope of the interpreter? I have something like
Map<String,Object> vars = loadVarsFromSomething();
and I would like to be able to do something like
for ( Map.Entry<String,Object> key : vars )
{
scope.put( key.getKey(), key.getValue() );
}
Is that possible?
Note here that the "scope" I am referring to is the actual scope of the Shell object that is being used by jshell interpreter.. I need to get a reference to the shell that the code is being invoked from so that I can create variables that look as if they were assigned by the user/caller ..