O'Reilly logo

Scripting in Java: Integrating with Groovy and JavaScript by Kishori Sharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3

image

Passing Parameters to Scripts

In this chapter, you will learn:

  • Classes used in passing parameters from Java programs to scripts
  • How to create and use Bindings object to hold the parameters
  • How to define the scope of parameters
  • How to pass parameters to scripts using different objects and scopes
  • The advantages and disadvantages of different ways of passing parameters
  • How to write script’s output to a file

Bindings, Scope, and Context

To understand the details of the parameter passing mechanism, three terms must be understood clearly: bindings, scope, and context. These terms are confusing at first. This chapter explains the parameter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required