Search This Blog

Total Pageviews

Nashorn Java Script Engine in Java8

Nashorn is a JavaScript engine developed in the Java programming language by Oracle and released in Java 8.

      - Implements a light weight high-performance JavaScript runtime in Java with a native JVM
      - Developers can develop free standing JavaScript applications using the jrunscript command-    line tool
      - It's all together new code base, foucsed on the newer technologies.
      - Utilizes the MethodHandles and InvokeDynamic API's described in JSR-292

Inline scripts:
jrunscript -e "print ('Hello Programmers Stack Viewers')" ;

Hello Programmers Stack Viewers

Interactive mode:

nashorn>print ('Welcome to Programmers stack');
Welcome to Programmers stack
nashorn> 50+40
nashorn> localThread = new java.lang.Thread(function() {print ('Programmers Thread');})
nashorn>Programmers Thread

No comments:

MongoDB Tutorial MongoDB Tutorial Table of Contents Introduction to MongoDB Installation Creating a Database Creati...