How to use Nashorn engine to call Java Objects
问题 I want to use Nashorn console as alternative to Rails c. For example I would like to call Java methods to import data from remote system and to execute data migrations. I found this very intresting: https://www.baeldung.com/java-nashorn $JAVA_HOME/bin/jjs jjs> print("test"); test jjs> How I can for example call some Java method from WAR package deployed on Wildfly server and pass some arguments? Is there any better alternative that you can propose? 回答1: Refer to Oracle's "Java Scripting