# Launcher (Luaj API)
Date: 2015-04-29

## org.luaj.vm2.server
Interface Launcher

All Known Implementing Classes:
  DefaultLauncher

    public interface Launcher

Interface to launch lua scripts using the `LuajClassLoader`.

Note: This class is experimental and subject to change in future versions.

This interface is purposely genericized to defer class loading so that luaj classes can come from the class loader.

The implementation should be acquired using `LuajClassLoader.NewLauncher()` or `LuajClassLoader.NewLauncher(Class)` which ensure that the classes are loaded to give each Launcher instance a pristine set of Globals, including the shared metatables.

Since:
  luaj 3.0.1
See Also:
  `LuajClassLoader`, `LuajClassLoader.NewLauncher()`, `LuajClassLoader.NewLauncher(Class)`, `DefaultLauncher`

Method Summary
`java.lang.Object[]` `launch(java.io.InputStream script, java.lang.Object[] arg)` Launch a script from an InputStream.
`java.lang.Object[]` `launch(java.io.Reader script, java.lang.Object[] arg)` Launch a script from a Reader.
`java.lang.Object[]` `launch(java.lang.String script, java.lang.Object[] arg)` Launch a script contained in a String.

Method Detail

### launch

    java.lang.Object[] launch(java.lang.String script,
                              java.lang.Object[] arg)

  Launch a script contained in a String.

  Parameters:
    `script` - The script contents.
    `arg` - Optional arguments supplied to the script.
  Returns:
    return values from the script.

### launch

    java.lang.Object[] launch(java.io.InputStream script,
                              java.lang.Object[] arg)

  Launch a script from an InputStream.

  Parameters:
    `script` - The script as an InputStream.
    `arg` - Optional arguments supplied to the script.
  Returns:
    return values from the script.

### launch

    java.lang.Object[] launch(java.io.Reader script,
                              java.lang.Object[] arg)

  Launch a script from a Reader.

  Parameters:
    `script` - The script as a Reader.
    `arg` - Optional arguments supplied to the script.
  Returns:
    return values from the script.

Copyright © 2007-2015 Luaj.org. All Rights Reserved.