LuaJ Import Lua Methods
问题 I'm using LuaJ, and I have a .lua file filled with a bunch of functions. How do I import these functions to use in Java with LuaJ? 回答1: One option would be to compile the file into Java code and import that. Another would be to simply invoke the Lua file directly from your Java code using the embeddable interpreter. * EDIT * There are good examples in the downloaded documentation. To run a script from within Java you would do something like this: import java.io.File; import java.io.FileReader