Update javadoc comments related to library inintialization.

This commit is contained in:
James Roseborough
2013-11-22 17:13:55 +00:00
parent 2123d3f924
commit 04fd646c87
14 changed files with 186 additions and 140 deletions

View File

@@ -3,7 +3,15 @@ import org.luaj.vm2.Globals;
import org.luaj.vm2.LuaValue;
import org.luaj.vm2.lib.jse.JsePlatform;
/** Simple program showing the minimal Java program to launch a script. */
/** Simple program showing the minimal Java program to launch a script.
*
* <p> In typical usage, a Globals object must be created to hold global state,
* and it can be used to compile and load lua files into executable LuaValue
* instances.
*
* @see Globals
* @see LuaValue
*/
public class SampleJseMain {
public static void main(String[] args) throws Exception {
@@ -12,7 +20,7 @@ public class SampleJseMain {
// create an environment to run in
Globals globals = JsePlatform.standardGlobals();
// Use the convenience function on the globals to load a chunk.
// Use the convenience function on Globals to load a chunk.
LuaValue chunk = globals.loadfile(script);
// Use any of the "call()" or "invoke()" functions directly on the chunk.