一款使 Lua 可以方便的调用 Java 的工具.
LuaJava is a scripting tool for Java. The goal of this tool is to allow scripts written in Lua to manipulate components developed in Java.
It allows Java components to be accessed from Lua using the same syntax that is used for accessing Lua`s native objects, without any need for declarations or any kind of preprocessing. LuaJava also allows Java to implement an interface using Lua. This way any interface can be implemented in Lua and passed as parameter to any method, and when called, the equivalent function will be called in Lua, and it’s result passed back to Java.
配置 java 环境.
运行 OneKeyCompile.bat.
编译完成,可在项目根目录中看到 luajava-1.0.dll、luajava-1.0.jar 2个文件.
若需编译好的文件,直接到 release 下载

交互方式执行 lua
java -cp luajava-1.0.jar org/keplerproject/luajava/Console
直接执行 lua 文件
java -cp luajava-1.0.jar org/keplerproject/luajava/Console xxx.lua
部分例子
java -cp luajava-1.0.jar org/keplerproject/luajava/Console ./test/awtTest.lua
java -cp luajava-1.0.jar org/keplerproject/luajava/Console ./test/simpleLuaFile.lua
java -cp luajava-1.0.jar org/keplerproject/luajava/Console ./test/testMap.lua
java -cp luajava-1.0.jar org/keplerproject/luajava/Console ./test/swingTest.lua
java -cp luajava-1.0.jar org/keplerproject/luajava/Console
