'jrunscript' - JavaScript Shell Command from JDK

This chapter provides introductions and tutorial examples on JavaScript shell command included in the JDK package. Topics include downloading and installing JDK; ECMAScript (JavaScript) engine used in 'jrunscript' command; running JavaScript code in command line; interactive or batch mode.

Downloading and Installing JDK 10

"jrunscript" - Scripting Shell Command and Options

Running JavaScript Code with 'jrunscript'

Evaluating JavaScript Code with 'jrunscript' Interactively

Running a JavaScript Code File with 'jrunscript'

Takeaways:

Note that JavaScript Engine has been removed from the distribution package as of JDK 15.

Table of Contents

 About This Book

 Introduction to JavaScript

 ECMAScript Language Specification and JavaScript Dialects

 Data Types, Variables and Expressions

 Flow Control Statements

 Creating, Accessing, and Manipulating Arrays

 Defining and Calling Functions

 Web Browser Supporting JavaScript

 Server-Side and Client-Side Web Scripting

 Introduction to Objects

 Defining Your Own Object Types

 Inheritance of Properties and Methods through the Prototype Object Chain

'jrunscript' - JavaScript Shell Command from JDK

 Using Functions as "Function" Objects

 Introduction to Built-in Object Types

 W3C's Document Object Model (DOM) Specifications

 AJAX (Asynchronous JavaScript And XML)

 References

 Full Version in PDF/EPUB