1、此文档是毕业设计外文翻译成品( 含英文原文+中文翻译) ,无需调整复杂的格 式!下载之后直接可用,方便快捷!本文价格不贵,也就几十块钱!一辈子也就 一次的事! 外文标题:Java APIs for Nashorn 外文作者:Kishori Sharan 文献出处: Scripting in Java Integrating with Groovy and JavaScript,2018 (如觉得年份太老,可改为近 2 年,毕竟很多毕业生都这样做) 英文 2646 单词,14808 字符(字符就是印刷符),中文 3875 汉字。 (如果字数多 了,可自行删减,大多数学校都是要求选取外文的一部分内
2、容进行翻译的。 ) Java APIs for Nashorn In this chapter, you will learn: nd-line Java code What Are Java APIs for Nashorn? It is straightforward to use Java classes in Nashorn scripts. Sometimes you may want to use Nashorn objects in Java code. You may pass Nashorn objects to Java code or Java code may eval
3、uate a Nashorn script and retrieve the reference of Nashorn objects. When Nashorn objects cross the boundary (script-to-Java), they need to be represented as objects of a Java class and you should be able to use them like any other Java objects. If your application uses only Nashorn, to take full ad
4、vantage of the Nashorn engine you may want to use options and extensions available in Nashorn. You will need to instantiate the Nashorn engine in Java code, using the classes that are specific to the Nashorn engine, not using the classes in the Java Scripting API. The Java APIs for Nashorn provide Java classes and interfaces that let you deal with the Nashorn scripting engine and Nashorn objects directly in Java code. Figure 12-1 depicts a class diagram of those classes and interfa