Type coercion for luajava package, make luajava an "addon"

This commit is contained in:
James Roseborough
2007-06-24 15:04:19 +00:00
parent 1d7793f8e6
commit 93fc4699a9
18 changed files with 574 additions and 142 deletions

View File

@@ -1,5 +1,4 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -19,7 +18,7 @@ public class LuacRunner {
public static void main( String[] args ) throws IOException {
// get script name
String script = (args.length>0? args[0]: "src/test/res/test1.luac");
String script = (args.length>0? args[0]: "/test1.luac");
System.out.println("loading '"+script+"'");
// new lua state
@@ -30,7 +29,7 @@ public class LuacRunner {
state.push(new LString(args[i]));
// load the file
InputStream is = new FileInputStream( script );
InputStream is = LuacRunner.class.getResourceAsStream( script );
Proto p = LoadState.undump(state, is, script);
// create closure to execute