CHAPTER 1

image

Getting Started

In this chapter, you will learn:

  • What scripting in Java is
  • How to execute your first script from Java
  • How to use other scripting languages such as JRuby, Jython from Java
  • javax.script API
  • How script engines are discovered and instantiated

What Is Scripting in Java?

Some believe that the Java Virtual Machine (JVM) can execute programs written only in the Java programming language. However, that is not true. The JVM executes language-neutral bytecode. It can execute programs written in any programming language, if the program can be compiled into Java bytecode.

A scripting language is a programming language that provides ...

Get Scripting in Java: Integrating with Groovy and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.