n******7 发帖数: 12463 | 1 一直以为javascript本来跟java没关系
当年为了伴大腿才这么叫的
但是看java官方对script的支持,又困惑了
先是说
Although scripting languages are usually interpreted at runtime, they can be
compiled into Java bytecode that can then be executed on the Java Virtual
Machine (JVM). Scripting languages can be faster and easier to use for
certain problems, so it is sometimes chosen by developers of Java
applications. However, if you write your Java application in a scripting
language, then you lose the benefits of the Java language (such as type
safety and access to the class library).
Java Specification Request (JSR) 223: Scripting for the Java Platform
addresses the issue of integrating Java and scripting languages. It defines
a standard framework and application programming interface (API) to embed
scripts in your Java applications and access Java objects from scripts. You
can find more information about JSR 223 on the Java Community Process (JCP)
website at http://jcp.org/en/jsr/detail?id=223
以上我感兴趣的,结果第二页又说:
The Nashorn engine is the default ECMAScript (JavaScript) engine bundled
with the Java SE Development Kit (JDK). The Nashorn engine was developed
fully in Java by Oracle as part of an OpenJDK project
Although Nashorn is the default ECMAScript engine used by the Java Scripting
API, you can use any script engine compliant with JSR 223, or you can
implement your own.
这意思是说ECMAScript (JavaScript) 就是官方默认的JVM script language 了? |