| Documentation Contents

# Scripting for the Java™ Platform

Many implementations of scripting and dynamically typed languages generate Java bytecodes so that programs can be run on the Java Platform, just as are actual Java programs. Implementing a language in this way (or as a Java interpreter class for the scripting language) provides all the advantages of the Java platform - scripting implementations can take advantage of the Java platform's binary portability, security, and high performance bytecode execution.

Java SE 6 includes JSR 223: Scripting for the Java™ Platform API. This is a framework by which Java Applications can "host" script engines. Sun's implementation of Java SE 6 includes an example script engine based on Mozilla Rhino:JavaScript for Java. The scripting framework supports third-party script engines through jar "service discovery" mechanism. It is possible to "drop" any JSR-223 compliant script engine in the CLASSPATH and access the same from your Java applications (much like JDBC drivers, JNDI implementations are accessed).

## API Reference

- javax.script Package

## Programmer's Guides

- Java Scripting Programmer's Guide - A conceptual description of the Java Scripting API, with code examples.

## Tool Reference

- jrunscript - scripting language independent command line shell

## More Information

- JSR-223 Scripting for the Java Platform
- Mozilla Rhino:Java Script for Java

Copyright © 1995-2010 Sun Microsystems, Inc. All Rights Reserved. Please send comments using this Feedback page. | Java Technology