SlideShare a Scribd company logo
1 of 69
Download to read offline
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1
JavaScript Running On
JavaVM: Nashorn
NISHIKAWA, Akihiro
Oracle Corporation Japan
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.2
The following is intended to outline our general product direction. It
is intended for information purposes only, and may not be
incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality
described for Oracle’s products remains at the sole discretion of
Oracle.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda  Nashorn
 Server Side JavaScript
 Nashorn in the future
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4
Nashorn
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5
Nashorn
JavaScript Engine running on Java VM
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6
Nashorn
JavaScript Engine running on Java VM
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7
Backgrounds
 Replacing Rhino
– Concerns about security, performance, and so on
 Proof of Concept for InvokeDynamic (JSR-292)
 Atwood's law
Any application that can be written in JavaScript will
eventually be written in JavaScript.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8
Scope of Project Nashorn
JEP 174
 ECMAScript-262 Edition 5.1 compliant
 Support for javax.script (JSR 223) API
 Interaction between Java and JavaScript
 Newly introduced command line tool (jjs)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9
Java VM
Scripting Engine
(Nashorn)
Scripting API
(JSR-223)
JavaScript codeJava code
Other runtime
Other APIs jjs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10
$JAVA_HOME/bin/jjs
$JAVA_HOME/jre/lib/ext/nashorn.jar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11
ECMAScript-262 Edition 5.1 compliant
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12
Out of scope of Project Nashorn
 ECMAScript 6 (Harmony)
– Generators
– Destructuring assignment
– const, let, ...
 DOM/CSS and related libraries
– jQuery, Prototype, Dojo, …
 Browser API and browser emulator
– HTML5 canvas, HTML5 audio, WebGL, WebWorkers...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13
Examples
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14
Invoke Nashorn from Java
ScriptEngineManager manager
= new ScriptEngineManager();
ScriptEngine engine
= manager.getEngineByName("nashorn");
engine.eval("print('hello world')");
engine.eval(new FileReader("hello.js"));
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15
Invoke Nashorn from Java
Invoke script function from Java
engine.eval("function hello(name) {
print('Hello, ' + name)}");
Invocable inv=(Invocable)engine;
Object obj=
inv.invokeFunction("hello","Taro");
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16
Invoke Nashorn from Java
Implement an interface with script function
engine.eval("function run(){
print('run() called’)
}");
Invocable inv =(Invocable)engine;
Runnable r=inv.getInterface(Runnable.class);
Thread th=new Threads(r);
th.start();
th.join();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17
Invoke Java/JavaFX from Nashorn
print(java.lang.System.currentTimeMillis());
jjs -fx ...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18
Nashorn for Scripting
Additional feature for scripting use
 -scripting option
 Here document
 Back quote
 String Interpolation
...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19
Nashorn Extensions
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20
Nashorn Extensions
The following topics are covered in this session.
 How to get references of Java type
 How to access properties of Java objects
 Relationship among Lambda, SAM, and Script function
 Scope and context
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21
Java type
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22
How to get references of Java type
Expression in Rhino (This expression is valid in Nashorn)
var hashmap=new java.util.HashMap();
Or
var HashMap=java.util.HashMap;
var hashmap=new HashMap();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23
How to get references of Java type
Recommended expression in Nashorn
var HashMap=Java.type('java.util.HashMap');
var hashmap=new HashMap();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24
Java.type
Class or Package?
java.util.ArrayList
java.util.Arraylist
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25
Java Array
Expression in Rhino
var intArray=
java.lang.reflect.Array.newInstance(
java.lang.Integer.TYPE, 5);
var Array=java.lang.reflect.Array;
var intClass=java.lang.Integer.TYPE;
var array=Array.newInstance(intClass, 5);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26
Java Array
Expression in Nashorn
var intArray=new(Java.type("int[]"))(5);
var intArrayType=Java.type("int[]");
var intArray=new intArrayType(5);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27
Access properties of
Java objects
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28
Using getter and setter
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map.put('size', 2);
print(map.get('size')); // 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29
Directly
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map.size=3;
print(map.size); // 3
print(map.size()); // 1
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30
Using Associative Array
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map['size']=4;
print(map['size']); // 4
print(map['size']()); // 1
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31
Lambda, SAM,
and Script function
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32
Lambda, SAM, and Script function
Nashorn converts a script function to a lambda object or any SAM
interface implementing object automatically.
var timer=new java.util.Timer();
timer.schedule(
function() { print('Tick') }, 0, 1000);
java.lang.Thread.sleep(5000);
timer.cancel();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33
Lambda, SAM, and Script function
Any Java object which is an instance of lambda type can be treated like a
script function.
var JFunction=
Java.type('java.util.function.Function');
var obj=new JFunction() {
// x->print(x*x)
apply: function(x) { print(x*x) }
}
print(typeof obj); //function
obj(9); // 81 like Script function
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34
Scope and Context
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35
Scope and Context
load and loadWithNewGlobal
 load
– Load scripts in the same global scope.
– If same name variables are in the original scripts and
loaded scripts, Corruption of each variable may happen.
 loadWithNewGlobal
– Load scripts in another global scope newly created.
– Even if same name variables are in the original scripts
and loaded scripts, Corruption of each variable may not
happen.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36
Scope and Context
ScriptContext contains one or more Bindings each associated each jsr223
"scope".
ScriptContext ctx=new SimpleScriptContext();
ctx.setBindings(engine.createBindings(),
ScriptContext.ENGINE_SCOPE);
Bindings engineScope=
ctx.getBindings(ScriptContext.ENGINE_SCOPE);
engineScope.put("x", "world");
engine.eval("print(x)", ctx);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37
Scope and Context
Using with clause and JavaImporter
with(new JavaImporter(java.util, java.io)){
var map=new HashMap(); //java.util.HashMap
map.put("js", "javascript");
map.put("java", "java");
print(map);
....
}
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38
Others
 Convert between Java array and JavaScript array
– Java.from
– Java.to
 Extend Java class and access super-class
– Java.extend
– Java.super
and so on...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39
Server Side JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40
Java EE for Next Generation Applications
Deliver HTML5, Dynamic and Scalable Applications
WebSockets
Avatar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41
Evolution of Web application architecture
Request-Response and Multi-page application
Java EE/JVM
Presentation
(Servlet/JSP)
Business
Logic
Backend
ConnectivityBrowser
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42
Evolution of Web application architecture
Use Ajax (JavaScript)
Java EE/JVM
Connectivity
(REST, SSE)
Presentation
(Servlet/JSP, JSF)
Business
Logic
Backend
ConnectivityBrowser
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43
Modern Web application architecture
Rather connectivity than Presentation – Single Page Application
Java EE/JVM
Connectivity
(WebSocket,
REST, SSE)
Presentation
(Servlet/JSP, JSF)
Business
Logic
Backend
ConnectivityBrowser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44
How about Node.js?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45
Mobile-enabled existing services with Node.js
Node.js
JavaScript
REST
SSE
WebSocket
Browser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46
How about
Node.js on JVM?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47
Mobile-enabled existing services with Node
Node running on Java VM
Java EE/JVM
Node
Server
Business
Logic
Backend
Connectivity
Client
JavaScriptBrowser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48
Avatar.js
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49
Avatar.js
Old name is "node.jar"
 Able to use almost all of modules available on Node.js
– Express, async, socket.io, ...
 Some modules are required to modify.
– Automatically recognize modules downloaded with
npm.
 Pros.
– Leverage node programming model
– Leverage existing Java assets, knowledge, and tools
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50
Avatar.js = Node + Java
Leverage Java technologies including Threads
JavaJavaScript
com.myOrg.myObj
java.util.SortedSet
java.lang.Thread
require('async')
postEvent
Node App
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51
Avatar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52
Avatar
Server side JavaScript services framework
 Provide data transmission features via REST, WebSocket,
and Server Sent Event (SSE)
 Leverage event-driven programming model and
programming modules of Node.js
 Integrate with Enterprise Features (Java EE)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53
*.html
*.js
*.css
HTTP
Application
Services
Avatar Modules
Node Modules
Avatar.js
Avatar Runtime
Avatar Compiler
Server Runtime (Java EE)
JDK 8 / Nashorn
Application
Views
REST/WebSocket/SSE
Avatar (Avatar EE)
Change
Notification
Data
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.54
HTTP
REST/WebSocket/SSE
Avatar Compiler
Application
Views
*.html
*.js
*.css
Application
Services
Avatar Modules
Node Modules
Avatar.js
Avatar Runtime
Server Runtime (Java EE)
JDK 8 / Nashorn
Architecture (Server Side)
Change
Notification
Data
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.55
Avatar Service
Java
JavaScript
HTTP Load Balancer
Services
Shared State
Services Services
Change
Notification
Data
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.56
Avatar Runtime
Server Runtime (Java EE)
Avatar Modules
Node Modules
Avatar.js
*.html
*.js
*.css
Application
Services
JDK 8 / Nashorn
Architecture (Client Side)
Change
Notification
Data
HTTP
REST/WebSocket/SSE
Application
Views
Avatar Compiler
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.57
Avatar and Avatar.js
progress steadily.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.58
Nashorn in the future
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.59
Nashorn in the future
 Bytecode Persistence (JEP 194)
http://openjdk.java.net/jeps/194
 Optimistic Typing
 Others
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60
Summary
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61
Key takeaways
 Nashorn
– Tightly integrated with Java
– Pay attention to different expression when migrating
artifacts from Rhino to Nashorn
– Progress steadily (performance improvement, new
features, compliant against new standards)
 Server Side JavaScript
– Avatar.js and Avatar are on-going.
– Please feedback!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62
Appendix
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63
Source code walk through
Shell jjs uses mainly.
Compiler generates classes (bytecode) from sources.
Scanner Create tokens from sources.
Parser Create AST/IR from tokens.
IR Elements of scripts
Codegen Create script class bytecode from AST/IR
Objects Runtime elements (Object, String, Number, Date, RegExp)
Scripts Classes including codes for scripts
Runtime Runtime tasks
Linker Binds callees on runtime based on JSR-292 (InvokeDynamic)
Dynalink Searching for best methods (available across languages)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64
Nashorn Documents
http://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation
 Java Platform, Standard Edition Nashorn User's Guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nash
orn/
 Scripting for the Java Platform
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/
 Oracle Java Platform, Standard Edition Java Scripting Programmer's
Guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_
guide/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65
Nashorn
http://openjdk.java.net/projects/nashorn/
 OpenJDK wiki – Nashorn
https://wiki.openjdk.java.net/display/Nashorn/Main
 Mailing List
nashorn-dev@openjdk.java.net
 Blogs
– Nashorn - JavaScript for the JVM
http://blogs.oracle.com/nashorn/
– Nashorn Japan
https://blogs.oracle.com/nashorn_ja/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66
Avatar.js
 Project Page
https://avatar-js.java.net/
 Mailing List
users@avatar-js.java.net
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.67
Avatar
 Project Page
https://avatar.java.net/
 Mailing List
users@avatar.java.net
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.68
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.69

More Related Content

What's hot

Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Poonam Bajaj Parhar
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Simon Ritter
 
Nashorn - JavaScript on the JVM - Akhil Arora
Nashorn - JavaScript on the JVM - Akhil AroraNashorn - JavaScript on the JVM - Akhil Arora
Nashorn - JavaScript on the JVM - Akhil Arorajaxconf
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Simon Ritter
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013Hazelcast
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一scalaconfjp
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling RewriterJustin Edelson
 
Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Poonam Bajaj Parhar
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaDmitry Kornilov
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesikmfrancis
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache TamayaAnatole Tresch
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingDmitry Kornilov
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 

What's hot (20)

Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
 
Nashorn - JavaScript on the JVM - Akhil Arora
Nashorn - JavaScript on the JVM - Akhil AroraNashorn - JavaScript on the JVM - Akhil Arora
Nashorn - JavaScript on the JVM - Akhil Arora
 
Troubleshooting Tools In JDK
Troubleshooting Tools In JDKTroubleshooting Tools In JDK
Troubleshooting Tools In JDK
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
Thinking Beyond ORM in JPA
Thinking Beyond ORM in JPAThinking Beyond ORM in JPA
Thinking Beyond ORM in JPA
 
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and Tamaya
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON Binding
 
What's New in Java 9
What's New in Java 9What's New in Java 9
What's New in Java 9
 
Thinking Beyond ORM in JPA
Thinking Beyond ORM in JPAThinking Beyond ORM in JPA
Thinking Beyond ORM in JPA
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 

Viewers also liked

Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)Logico
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkGuo Albert
 
これからのNashorn
これからのNashornこれからのNashorn
これからのNashornLogico
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Logico
 
Docker: The basics - Including a demo with an awesome full-stack JS app
Docker: The basics - Including a demo with an awesome full-stack JS appDocker: The basics - Including a demo with an awesome full-stack JS app
Docker: The basics - Including a demo with an awesome full-stack JS appMarcelo Rodrigues
 
Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09Claude Coulombe
 
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向Tatsuo Kudo
 
SORACOM Bootcamp Rec1 - SORACOM Air (1)
SORACOM Bootcamp Rec1 - SORACOM Air (1)SORACOM Bootcamp Rec1 - SORACOM Air (1)
SORACOM Bootcamp Rec1 - SORACOM Air (1)SORACOM,INC
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Chris Richardson
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Servermohamedmoharam
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationTomcat Expert
 
The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8Takipi
 
The Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftThe Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftMuleSoft
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd trainingFranck SIMON
 
APIdays Australia 2017 TOI #APIdaysAU
APIdays Australia 2017 TOI #APIdaysAUAPIdays Australia 2017 TOI #APIdaysAU
APIdays Australia 2017 TOI #APIdaysAUTatsuo Kudo
 

Viewers also liked (20)

Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
 
これからのNashorn
これからのNashornこれからのNashorn
これからのNashorn
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
Docker: The basics - Including a demo with an awesome full-stack JS app
Docker: The basics - Including a demo with an awesome full-stack JS appDocker: The basics - Including a demo with an awesome full-stack JS app
Docker: The basics - Including a demo with an awesome full-stack JS app
 
Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09
 
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向
利用者本位のAPI提供に向けたアイデンティティ (ID) 標準仕様の動向
 
SORACOM Bootcamp Rec1 - SORACOM Air (1)
SORACOM Bootcamp Rec1 - SORACOM Air (1)SORACOM Bootcamp Rec1 - SORACOM Air (1)
SORACOM Bootcamp Rec1 - SORACOM Air (1)
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
 
The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8The Dark Side Of Lambda Expressions in Java 8
The Dark Side Of Lambda Expressions in Java 8
 
The Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoftThe Emerging Integration Reference Architecture | MuleSoft
The Emerging Integration Reference Architecture | MuleSoft
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
EJB .
EJB .EJB .
EJB .
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
APIdays Australia 2017 TOI #APIdaysAU
APIdays Australia 2017 TOI #APIdaysAUAPIdays Australia 2017 TOI #APIdaysAU
APIdays Australia 2017 TOI #APIdaysAU
 

Similar to Nashorn: JavaScript Running on Java VM (English)

Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Bruno Borges
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8jclingan
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěDevelcz
 
Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Bruno Borges
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)David Delabassee
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeJAXLondon2014
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...AMD Developer Central
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014David Delabassee
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)jeckels
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Thomas Wuerthinger
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
Java Magazine : The JAVA Virtual Machine alternative languages
Java Magazine : The JAVA Virtual Machine alternative languagesJava Magazine : The JAVA Virtual Machine alternative languages
Java Magazine : The JAVA Virtual Machine alternative languagesErik Gur
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9Deepu Xavier
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevillaTrisha Gee
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.Miguel Araújo
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018CodeOps Technologies LLP
 

Similar to Nashorn: JavaScript Running on Java VM (English) (20)

Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8
 
Java 8
Java 8Java 8
Java 8
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
 
Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8Nashorn: nova engine Javascript do Java SE 8
Nashorn: nova engine Javascript do Java SE 8
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
Java Magazine : The JAVA Virtual Machine alternative languages
Java Magazine : The JAVA Virtual Machine alternative languagesJava Magazine : The JAVA Virtual Machine alternative languages
Java Magazine : The JAVA Virtual Machine alternative languages
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 
Jfxpub binding
Jfxpub bindingJfxpub binding
Jfxpub binding
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.
 
Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018Java is Container Ready - Vaibhav - Container Conference 2018
Java is Container Ready - Vaibhav - Container Conference 2018
 

More from Logico

Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Logico
 
Look into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLook into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLogico
 
Jvmls 2019 feedback valhalla update
Jvmls 2019 feedback   valhalla updateJvmls 2019 feedback   valhalla update
Jvmls 2019 feedback valhalla updateLogico
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Logico
 
Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Logico
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)Logico
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Logico
 
Another compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationAnother compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationLogico
 
Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Logico
 
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)Logico
 
Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Logico
 

More from Logico (11)

Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)
 
Look into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLook into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpoint
 
Jvmls 2019 feedback valhalla update
Jvmls 2019 feedback   valhalla updateJvmls 2019 feedback   valhalla update
Jvmls 2019 feedback valhalla update
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
 
Another compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationAnother compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilation
 
Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)
 
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
 
Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)
 

Recently uploaded

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 

Recently uploaded (20)

Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 

Nashorn: JavaScript Running on Java VM (English)

  • 1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1 JavaScript Running On JavaVM: Nashorn NISHIKAWA, Akihiro Oracle Corporation Japan
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.2 The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda  Nashorn  Server Side JavaScript  Nashorn in the future
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4 Nashorn
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5 Nashorn JavaScript Engine running on Java VM
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6 Nashorn JavaScript Engine running on Java VM
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7 Backgrounds  Replacing Rhino – Concerns about security, performance, and so on  Proof of Concept for InvokeDynamic (JSR-292)  Atwood's law Any application that can be written in JavaScript will eventually be written in JavaScript.
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8 Scope of Project Nashorn JEP 174  ECMAScript-262 Edition 5.1 compliant  Support for javax.script (JSR 223) API  Interaction between Java and JavaScript  Newly introduced command line tool (jjs)
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9 Java VM Scripting Engine (Nashorn) Scripting API (JSR-223) JavaScript codeJava code Other runtime Other APIs jjs
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10 $JAVA_HOME/bin/jjs $JAVA_HOME/jre/lib/ext/nashorn.jar
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11 ECMAScript-262 Edition 5.1 compliant
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12 Out of scope of Project Nashorn  ECMAScript 6 (Harmony) – Generators – Destructuring assignment – const, let, ...  DOM/CSS and related libraries – jQuery, Prototype, Dojo, …  Browser API and browser emulator – HTML5 canvas, HTML5 audio, WebGL, WebWorkers...
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13 Examples
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14 Invoke Nashorn from Java ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("nashorn"); engine.eval("print('hello world')"); engine.eval(new FileReader("hello.js"));
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15 Invoke Nashorn from Java Invoke script function from Java engine.eval("function hello(name) { print('Hello, ' + name)}"); Invocable inv=(Invocable)engine; Object obj= inv.invokeFunction("hello","Taro");
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16 Invoke Nashorn from Java Implement an interface with script function engine.eval("function run(){ print('run() called’) }"); Invocable inv =(Invocable)engine; Runnable r=inv.getInterface(Runnable.class); Thread th=new Threads(r); th.start(); th.join();
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17 Invoke Java/JavaFX from Nashorn print(java.lang.System.currentTimeMillis()); jjs -fx ...
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18 Nashorn for Scripting Additional feature for scripting use  -scripting option  Here document  Back quote  String Interpolation ...
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19 Nashorn Extensions
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20 Nashorn Extensions The following topics are covered in this session.  How to get references of Java type  How to access properties of Java objects  Relationship among Lambda, SAM, and Script function  Scope and context
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21 Java type
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22 How to get references of Java type Expression in Rhino (This expression is valid in Nashorn) var hashmap=new java.util.HashMap(); Or var HashMap=java.util.HashMap; var hashmap=new HashMap();
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23 How to get references of Java type Recommended expression in Nashorn var HashMap=Java.type('java.util.HashMap'); var hashmap=new HashMap();
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24 Java.type Class or Package? java.util.ArrayList java.util.Arraylist
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25 Java Array Expression in Rhino var intArray= java.lang.reflect.Array.newInstance( java.lang.Integer.TYPE, 5); var Array=java.lang.reflect.Array; var intClass=java.lang.Integer.TYPE; var array=Array.newInstance(intClass, 5);
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26 Java Array Expression in Nashorn var intArray=new(Java.type("int[]"))(5); var intArrayType=Java.type("int[]"); var intArray=new intArrayType(5);
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27 Access properties of Java objects
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28 Using getter and setter var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map.put('size', 2); print(map.get('size')); // 2
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29 Directly var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map.size=3; print(map.size); // 3 print(map.size()); // 1
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30 Using Associative Array var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map['size']=4; print(map['size']); // 4 print(map['size']()); // 1
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31 Lambda, SAM, and Script function
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32 Lambda, SAM, and Script function Nashorn converts a script function to a lambda object or any SAM interface implementing object automatically. var timer=new java.util.Timer(); timer.schedule( function() { print('Tick') }, 0, 1000); java.lang.Thread.sleep(5000); timer.cancel();
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33 Lambda, SAM, and Script function Any Java object which is an instance of lambda type can be treated like a script function. var JFunction= Java.type('java.util.function.Function'); var obj=new JFunction() { // x->print(x*x) apply: function(x) { print(x*x) } } print(typeof obj); //function obj(9); // 81 like Script function
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34 Scope and Context
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35 Scope and Context load and loadWithNewGlobal  load – Load scripts in the same global scope. – If same name variables are in the original scripts and loaded scripts, Corruption of each variable may happen.  loadWithNewGlobal – Load scripts in another global scope newly created. – Even if same name variables are in the original scripts and loaded scripts, Corruption of each variable may not happen.
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36 Scope and Context ScriptContext contains one or more Bindings each associated each jsr223 "scope". ScriptContext ctx=new SimpleScriptContext(); ctx.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE); Bindings engineScope= ctx.getBindings(ScriptContext.ENGINE_SCOPE); engineScope.put("x", "world"); engine.eval("print(x)", ctx);
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37 Scope and Context Using with clause and JavaImporter with(new JavaImporter(java.util, java.io)){ var map=new HashMap(); //java.util.HashMap map.put("js", "javascript"); map.put("java", "java"); print(map); .... }
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38 Others  Convert between Java array and JavaScript array – Java.from – Java.to  Extend Java class and access super-class – Java.extend – Java.super and so on...
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39 Server Side JavaScript
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40 Java EE for Next Generation Applications Deliver HTML5, Dynamic and Scalable Applications WebSockets Avatar
  • 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41 Evolution of Web application architecture Request-Response and Multi-page application Java EE/JVM Presentation (Servlet/JSP) Business Logic Backend ConnectivityBrowser
  • 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42 Evolution of Web application architecture Use Ajax (JavaScript) Java EE/JVM Connectivity (REST, SSE) Presentation (Servlet/JSP, JSF) Business Logic Backend ConnectivityBrowser JavaScript
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43 Modern Web application architecture Rather connectivity than Presentation – Single Page Application Java EE/JVM Connectivity (WebSocket, REST, SSE) Presentation (Servlet/JSP, JSF) Business Logic Backend ConnectivityBrowser View Controller JavaScript
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44 How about Node.js?
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45 Mobile-enabled existing services with Node.js Node.js JavaScript REST SSE WebSocket Browser View Controller JavaScript
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46 How about Node.js on JVM?
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47 Mobile-enabled existing services with Node Node running on Java VM Java EE/JVM Node Server Business Logic Backend Connectivity Client JavaScriptBrowser View Controller JavaScript
  • 48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48 Avatar.js
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49 Avatar.js Old name is "node.jar"  Able to use almost all of modules available on Node.js – Express, async, socket.io, ...  Some modules are required to modify. – Automatically recognize modules downloaded with npm.  Pros. – Leverage node programming model – Leverage existing Java assets, knowledge, and tools
  • 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50 Avatar.js = Node + Java Leverage Java technologies including Threads JavaJavaScript com.myOrg.myObj java.util.SortedSet java.lang.Thread require('async') postEvent Node App
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51 Avatar
  • 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52 Avatar Server side JavaScript services framework  Provide data transmission features via REST, WebSocket, and Server Sent Event (SSE)  Leverage event-driven programming model and programming modules of Node.js  Integrate with Enterprise Features (Java EE)
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53 *.html *.js *.css HTTP Application Services Avatar Modules Node Modules Avatar.js Avatar Runtime Avatar Compiler Server Runtime (Java EE) JDK 8 / Nashorn Application Views REST/WebSocket/SSE Avatar (Avatar EE) Change Notification Data
  • 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.54 HTTP REST/WebSocket/SSE Avatar Compiler Application Views *.html *.js *.css Application Services Avatar Modules Node Modules Avatar.js Avatar Runtime Server Runtime (Java EE) JDK 8 / Nashorn Architecture (Server Side) Change Notification Data
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.55 Avatar Service Java JavaScript HTTP Load Balancer Services Shared State Services Services Change Notification Data
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.56 Avatar Runtime Server Runtime (Java EE) Avatar Modules Node Modules Avatar.js *.html *.js *.css Application Services JDK 8 / Nashorn Architecture (Client Side) Change Notification Data HTTP REST/WebSocket/SSE Application Views Avatar Compiler
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.57 Avatar and Avatar.js progress steadily.
  • 58. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.58 Nashorn in the future
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.59 Nashorn in the future  Bytecode Persistence (JEP 194) http://openjdk.java.net/jeps/194  Optimistic Typing  Others
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60 Summary
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61 Key takeaways  Nashorn – Tightly integrated with Java – Pay attention to different expression when migrating artifacts from Rhino to Nashorn – Progress steadily (performance improvement, new features, compliant against new standards)  Server Side JavaScript – Avatar.js and Avatar are on-going. – Please feedback!
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62 Appendix
  • 63. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63 Source code walk through Shell jjs uses mainly. Compiler generates classes (bytecode) from sources. Scanner Create tokens from sources. Parser Create AST/IR from tokens. IR Elements of scripts Codegen Create script class bytecode from AST/IR Objects Runtime elements (Object, String, Number, Date, RegExp) Scripts Classes including codes for scripts Runtime Runtime tasks Linker Binds callees on runtime based on JSR-292 (InvokeDynamic) Dynalink Searching for best methods (available across languages)
  • 64. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64 Nashorn Documents http://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation  Java Platform, Standard Edition Nashorn User's Guide http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nash orn/  Scripting for the Java Platform http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/  Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_ guide/
  • 65. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65 Nashorn http://openjdk.java.net/projects/nashorn/  OpenJDK wiki – Nashorn https://wiki.openjdk.java.net/display/Nashorn/Main  Mailing List nashorn-dev@openjdk.java.net  Blogs – Nashorn - JavaScript for the JVM http://blogs.oracle.com/nashorn/ – Nashorn Japan https://blogs.oracle.com/nashorn_ja/
  • 66. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66 Avatar.js  Project Page https://avatar-js.java.net/  Mailing List users@avatar-js.java.net
  • 67. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.67 Avatar  Project Page https://avatar.java.net/  Mailing List users@avatar.java.net
  • 68. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.68
  • 69. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.69