Getting Started

This Pnuts User's Guide describes basic usage of Pnuts environment. Readers will learn what kind of functions are available and how to integrate Pnuts into Java applications.

This section explains some prerequisites to read the rest of the guide.

Runtime Environment

Pnuts runs on JRE (Java Runtime Environment) version 1.2 or higher. The Pnuts distribution does not include JRE, which means that you need to install a JRE (or JDK) on your computer before using Pnuts. If you have two or more JREs installed, you can pick one to use Pnuts every time you start a Pnuts interpreter by setting environment variable PATH.

In addition to JRE, pnuts.jar file is required to run the Pnuts interpreter. The pnuts.jar contains classes of Pnuts API which are used to implement the pnuts command, in addition, developers can call them directly to incorporate the Pnuts' functionality into their applications.

Functions

Pnuts functions fall into two categories: built-in functions and others. It is important to distinguish them. Built-in functions are guaranteed to be available even if no module or script is loaded. The Language Specification defines the built-in functions.

Modules

Module is a set of reusable functions which are used for a particular purpose, or are interrelated. User can choose necessary modules at run time, so that he/she can take advantage of existing modules without worrying about name confliction. Each module is packaged as a separate JAR file, which should be added to CLASSPATH or located in the directory ${PNUTS_HOME}/modules/.

Several modules are included in the Pnuts distribution. By default, a couple of general-purpose modules are chosen when Pnuts interpreter starts. User can specify the startup module in the environment variable(PNUTS_MODULE). See "Modules" for more information of each module.