Update javadoc comments related to library inintialization.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user