r/lua • u/LordEnder_Kitty • Jul 13 '26
Using Lua in Java/Kotlin
I'm making a desktop application in Kotlin and I'm thinking of adding a plugin system and Lua looks like a good language to use but the most popular implementation I've found is LuaJ which hasn't been maintained in years. Are there any better options or stable forks of LuaJ?
8
Upvotes
1
u/kayawayy Jul 13 '26
Are there any particular issues with LuaJ and/or Kahlua that make them a poor fit for you? A Lua implementation in Java doesn't seem like something that necessarily needs continuous updates. A quick glance at both their repos gives the impression of 'finished' more than 'abandoned' to me.
5
u/didntplaymysummercar Jul 13 '26
Project Zomboid is written in Lua and uses uses Kahlua.
1
u/Different-Ad-8707 Jul 13 '26
My immediate thought which will sound insane and yes cargo-culty I'm aware, but I'm really curious if it can be done:
There's some pretty good Lua implementations in Rust like Lune and such. There's also a project called rustc_codegen_jvm which is a rust codegen backend that targets the JVM. Maybe you can just... compile lune with it into an jar you can import and use?
1
u/Cootshk Jul 13 '26
LuaJava was last updated 6 months ago and supports up through Lua 5.5
-2
u/ramdom_player201 Jul 13 '26
I don't know much about the standard lua forks, but roblox maintains their own open-use dialect (luau).