{{theTime}}

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.

Nashorn 
      - 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

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

Hello Programmers Stack Viewers

Interactive mode:
-----------------

jrunscript
nashorn>print ('Welcome to Programmers stack');
Welcome to Programmers stack
nashorn> 50+40
90
nashorn> localThread = new java.lang.Thread(function() {print ('Programmers Thread');})
Thread[Thread-0,main]
nashorn>localThread.start()
nashorn>Programmers Thread

No comments:

Could not find method signingConfigs() for arguments

Could not find method signingConfigs() for arguments [build_5dw7nwfc8ibd8sagvx4p79x1u$_run_closure5@13e86039] on root project 'android&#...