Java(Script) on JVM
summary
Nashorn is a JavaScript runtime bundled with the JDK that implements ECMAScript 5.1 (partial 6), exposes a jjs REPL, and compiles JS to JVM bytecode with caching to speed repeated evals. Java and JavaScript interoperate: JS can instantiate Java classes and call methods, Java can invoke JS functions via Invocable, and primitive/array mappings are supported. A JVM Node-like stack (Avatar.js) runs many Node modules and Express apps on the JVM. Security and sandboxing use JEP 202; there is no browser DOM.
AI-written summary · about
chapters (16)
- 0:00Introduction to JavaScript on JVM
- 3:19JavaScript madness and Nashorn
- 7:16Why JavaScript on JVM
- 10:03Nashorn vs Rhino engines
- 11:51Using JavaScript in Java code
- 16:09Calling Java from JavaScript
- 21:09Primitives and arrays in Nashorn
- 26:22Java 8 features in Nashorn
- 33:15Polyglot programming with Nashorn
- 35:04Modern web architecture with Nashorn
- 39:30Avatar.js and event loops
- 43:53Demo of Avatar.js application
- 56:49Avatar project overview
- 1:00:07Q&A session part 1
- 1:04:43Q&A session part 2
- 1:14:07Q&A session part 3
