*Result*: Scripting Java Applications with Sleep.

Title:
Scripting Java Applications with Sleep.
Authors:
Source:
Dr. Dobb's Journal: Software Tools for the Professional Programmer. Jul2005, Vol. 30 Issue 7, p38-40. 3p. 1 Color Photograph, 1 Diagram.
Database:
Business Source Premier

*Further Information*

*This article illustrates how programmers can use Sleep, a freely available library, to add scripting services to Java applications. The Sleep library provides a parser, interpreter, and default library. Embedding Sleep consists of extending the language to include functions, variables, and other features to access an application's functionality. Scripters can then use these additions to manipulate the application from a script. The author relates that originally, Sleep was an experiment to play with some concepts he was learning at the time. Since then, Sleep has evolved into a library for adding scripting services to Java applications. This evolution came out of the author's need for a heavily extendable language solution for jIRCii, an Internet relay chat client he has been developing for a few years as of July 2005. jIRCii uses Sleep to let users respond to events, define shortcut aliases, bind keyboard shortcuts, and script their own menus. In short, jIRCii is a very complete example of what Sleep can do. Sleep's syntax was heavily influenced by Perl. The default library includes most of the functionality you would expect from a more general-purpose scripting language. This includes string manipulation functions, regular expressions, and an input/output framework that handles processes, sockets, and files with the same interface.*