实践jdk6新特性 Posted on 2018-03-08 | In Java | Visitors Scripting Language Support (Rhino) Rhino是一个基于java实现的JavaScript引擎 12345678ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("js"); // 执行js Object result = engine.eval("'Hello, World!'.length"); System.out.println(result); // 执行外部js result = engine.eval(Files.newBufferedReader(Paths.get("hello.js"))); System.out.println(result); Java8新引入了一个JavaScript引擎Nashorn JDBC 4.0 API Java Compiler API Pluggable Annotations Native PKI, Java GSS, Kerberos and LDAP support. Integrated Web Services. Lot more enhancements. 参考 Java Versions, Features and History Java Programming Language Enhancements