Home | Amazing | Today | Tags | Publishers | Years | Account | Search 
Scripting in Java: Integrating with Groovy and JavaScript

Buy

When I wrote the three volumes of Harnessing Java 7 in 2012, I did not include a chapter on the Java Scripting API because of the limited space that I had for each volume. Note the phrase “Java Scripting,” which uses two separate words: “Java” and “Scripting.” “JavaScript” is the name of a scripting language, which has nothing to do with the Java programming language, whereas the phrase “Java Scripting API” is the Java API that lets Java applications interact with scripting languages.

In the first release, I had titled this book Harnessing Scripting in Java, and it covered only the Java Scripting API and Rhino script engine. The release did not cover the JavaScript language. JDK 8 ships with a lightweight high-performance JavaScript engine called Nashorn, which replaces the Rhino engine that shipped with JDK7. This book covers the JavaScript language completely with comprehensive coverage of the Nashorn engine.

Learning the Java Scripting API, which was introduced in Java 6, is not essential for all Java developers, although it is important and very useful if you are familiar with scripting languages such as Rhino JavaScript, Groovy, Jython, JRuby, and so on and want to take advantage of those scripting languages in Java applications.

I started learning the Java Scripting API by reading some online blogs and articles; they were helpful, but not quite comprehensive in giving me a clear and complete picture of how the Java Scripting API helps Java applications interact with scripting languages. My next step in the learning process was reading the specification for JSR-223, Scripting for the Java Platform Specification, along with the Java API documentation for the javax.script package. Reading the JSR-233 specification gave me a complete picture of the Java Scripting API; however, I was not ready to write this book. I was still missing some pieces of the puzzle. Therefore, I decided to read the source code for the classes in the javax.script package. I also read the source code for some scripting languages. Finally, in the process of learning the API, I developed a simple scripting engine, which I named JKScript. Finally, I read the ECMAScript 5.1 specification to get a complete picture of the JavaScript language itself. The main difficulty that I faced in writing this book was getting the information on the Nashorn engine and its features. A Wiki is maintained at https://wiki.openjdk.java.net/display/Nashorn/Main, which provides information about the Nashorn engine in bits and pieces. Tying them together in this book with cohesive examples was a challenge.

It is my sincere hope that readers will enjoy this book and benefit from it.

(HTML tags aren't allowed.)

Hierarchical Bayesian Optimization Algorithm: Toward a New Generation of Evolutionary Algorithms
Hierarchical Bayesian Optimization Algorithm: Toward a New Generation of Evolutionary Algorithms

This book provides a framework for the design of competent optimization techniques by combining advanced evolutionary algorithms with state-of-the-art machine learning techniques. The primary focus of the book is on two algorithms that replace traditional variation operators of evolutionary algorithms, by learning and sampling Bayesian networks:...

Microbiology For Dummies
Microbiology For Dummies

Microbiology For Dummies (9781119544425) was previously published as Microbiology For Dummies (9781118871188). While this version features a new Dummies cover and design, the content is the same as the prior release and should not be considered a new or updated product.

Microbiology is the study...

ICU Protocols: A Step-wise Approach, Vol I
ICU Protocols: A Step-wise Approach, Vol I

The second edition of this highly successful book includes up-to-date notes on the step-wise management of clinical emergencies encountered in everyday intensive care units (ICU). Each thoroughly revised chapter provides concise information for point-of-care treatment, making it a practical guide clinicians can refer to on...


WebSphere 4.0 AEs Workbook for Enterprise JavaBeans, 3rd Edition
WebSphere 4.0 AEs Workbook for Enterprise JavaBeans, 3rd Edition

The WebSphere workbook is designed to be a companion guide for the book Enterprise Java Beans, 3rd Edition (O'Reilly) by Richard Monson-Haefel. This workbook is published with the approval of O'Reilly & Associates and is produced by Richard Monson-Haefel.

The goal of this WebSphere-specific workbook, like the other...

Data Mining in Public and Private Sectors: Organizational and Government Applications (Premier Reference Source)
Data Mining in Public and Private Sectors: Organizational and Government Applications (Premier Reference Source)

Data mining has developed rapidly and has become very popular in the past two decades, but actually has its origin in the early stages of IT, then being mostly limited to one-dimensional searching in databases. The statistical basis of what is now also referred to as data mining has often been laid centuries ago. In corporate...

Windows Forms Programming in C#
Windows Forms Programming in C#

Programming Windows Forms in C# is the ultimate guide to using the Microsoft .NET forms package. Readers learn how to build smart client applications that take full advantage of both the rich user interface features of the Microsoft Windows operating system and the deployment features of...

©2021 LearnIT (support@pdfchm.net) - Privacy Policy