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 6

image

Using Java in Scripting Languages

In this chapter, you will learn:

  • How to import Java classes into scripts
  • How to create Java objects and use them in scripts
  • How to call overloaded methods of Java objects
  • How to create Java arrays
  • How to extend a Java class and implement Java interfaces in scripts
  • How to invoke superclass methods of an object from scripts

Scripting languages allow using Java class libraries in scripts. Each scripting language has its own syntax for using Java classes. It is not possible, and is outside the scope of this book, to discuss the syntax of all scripting languages. In this chapter, I will discuss the syntax ...

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