Type coercion for luajava package, make luajava an "addon"
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user