{"id":24112536,"url":"https://github.com/gudzpoz/luajava","last_synced_at":"2026-01-03T10:27:36.587Z","repository":{"id":37496255,"uuid":"453439489","full_name":"gudzpoz/luajava","owner":"gudzpoz","description":"Lua for Java on Windows, Mac OS X, Linux, Android. 5.1, 5.2, 5.3, 5.4, LuaJ or LuaJIT.","archived":false,"fork":false,"pushed_at":"2024-12-23T13:56:14.000Z","size":6305,"stargazers_count":187,"open_issues_count":19,"forks_count":27,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-26T12:13:57.733Z","etag":null,"topics":["java","jvm","lua","luajava","luajit","scripting"],"latest_commit_sha":null,"homepage":"https://gudzpoz.github.io/luajava/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"deathbeam/jua","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gudzpoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-29T15:39:03.000Z","updated_at":"2025-05-22T17:00:28.000Z","dependencies_parsed_at":"2024-04-17T08:48:58.897Z","dependency_job_id":"d730a2ac-3478-49c0-b823-93ffbfb09976","html_url":"https://github.com/gudzpoz/luajava","commit_stats":{"total_commits":450,"total_committers":5,"mean_commits":90.0,"dds":0.4288888888888889,"last_synced_commit":"3dca13e6f94fc5525cc1654a5cfe342e03cd12e4"},"previous_names":["gudzpoz/jua"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/gudzpoz/luajava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gudzpoz%2Fluajava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gudzpoz%2Fluajava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gudzpoz%2Fluajava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gudzpoz%2Fluajava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gudzpoz","download_url":"https://codeload.github.com/gudzpoz/luajava/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gudzpoz%2Fluajava/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279184053,"owners_count":26121535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jvm","lua","luajava","luajit","scripting"],"created_at":"2025-01-11T03:32:15.489Z","updated_at":"2026-01-03T10:27:36.579Z","avatar_url":"https://github.com/gudzpoz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LuaJava #\n\n[![Build Status](https://github.com/gudzpoz/luajava/actions/workflows/build-natives.yml/badge.svg)](https://github.com/gudzpoz/luajava/actions/workflows/build-natives.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Codecov](https://img.shields.io/codecov/c/github/gudzpoz/luajava?label=Coverage)](https://app.codecov.io/gh/gudzpoz/luajava/)\n[![Java 8](https://img.shields.io/badge/Java-8-brown)](https://www.oracle.com/java/technologies/java8.html)\n[![Maven Central](https://img.shields.io/maven-central/v/party.iroiro.luajava/luajava?color=blue\u0026label=Maven%20Central)](https://mvnrepository.com/search?q=party.iroiro.luajava)\n\n[![Build Status](https://github.com/gudzpoz/luajava/actions/workflows/docs.yml/badge.svg)](https://github.com/gudzpoz/luajava/actions/workflows/docs.yml)\n[![Document Version](https://img.shields.io/github/package-json/v/gudzpoz/luajava?filename=docs%2Fpackage.json\u0026label=Documentation)](https://luajava.iroiro.party/)\n\n[![Hello World Example](./docs/.vuepress/public/hello.svg)](https://luajava.iroiro.party/examples/hello-world-mod.html)\n\n- [LuaJava](#luajava)\n  - [About](#about)\n  - [Platforms and Versions](#platforms-and-versions)\n    - [Artifacts](#artifacts)\n  - [Java module](#java-module)\n    - [Examples](#examples)\n    - [More](#more)\n  - [Credits](#credits)\n  - [License](#license)\n\n## About ##\n\nThis is yet another fork of [the original LuaJava](https://github.com/jasonsantos/luajava).\n\n\u003e 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. LuaJava 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.\n\u003e\n\u003e LuaJava also allows any Java interface to get implemented in Lua and passed as parameter to any method, and when called, the equivalent function will be called in Lua, the result passed back to Java.\n\u003e\n\u003e LuaJava is available under the same license as Lua 5.1, that is, it can be used at no cost for both academic and commercial purposes.\n\nDocumentation is available at [LuaJava](https://luajava.iroiro.party/) along with Javadoc.\nYou are also recommended to familiarize yourself with [the Lua C API](https://www.lua.org/manual/5.4/manual.html#4)\nsince this library is more or less just a thin wrapper and requires some basic understanding of the C API.\n\n## Platforms and Versions ##\n\n\u003cdiv style=\"display:flex;justify-content:center\"\u003e\n\n| Lua 5.1 | Lua 5.2 | Lua 5.3 | Lua 5.4 | Lua 5.5 | LuaJIT      | LuaJ        |\n|:-------:|:-------:|:-------:|:-------:|:--------|:-----------:|:-----------:|\n| 5.1.5   | 5.2.4   | 5.3.6   | 5.4.8   | 5.5.0   | [`7152e15`] | [LuaJ fork] |\n\n\u003c/div\u003e\n\n[`7152e15`]: https://github.com/LuaJIT/LuaJIT/commits/7152e15489d2077cd299ee23e3d51a4c599ab14f\n\n[LuaJ fork]: https://github.com/wagyourtail/luaj\n\nSupported platforms: **Windows**, **Linux**, **MacOS** and **Android**. Compiled against both ARM and x32/x64. Binaries are not yet tested for iOS.\n\nCompiled natives are available for most common platforms. Check out [LuaJava Platforms](https://luajava.iroiro.party/#platforms) for a platform matrix. LuaJ bindings do not need native binaries and should run on all platforms theoretically.\n\n### Artifacts\n\nTo include LuaJava into your project, you need to include two artifacts, one for the Java bindings, the other for the compiled native binaries.\n(For LuaJ bindings, you don't need the latter one. However, you will need to add [JitPack](https://jitpack.io/) to your repositories.)\n\n```groovy\n// Example: LuaJIT with Desktop natives\nimplementation 'party.iroiro.luajava:luajit:4.1.0'\nruntimeOnly 'party.iroiro.luajava:luajit-platform:4.1.0:natives-desktop'\n```\n\nDifferent artifacts are provided for different Lua versions and different platforms. Check out [Getting Started](https://luajava.iroiro.party/getting-started.html) for an overview. Or you may also search in the [Maven Central](https://mvnrepository.com/search?q=party.iroiro.luajava).\n\nOptionally, you may include `party.iroiro.luajava:jsr223` to provide JSR 223 functionalities. (Note that you still need the above artifacts!)\n\n## Java module ##\n\n[The `java` module](https://luajava.iroiro.party/api.html#java-module) provides these functions:\n\n- `array`: Create a Java array.\n- `caught`: Return the latest captured Java `Throwable`\n- `detach`: Detach the sub-thread from registry to allow for GC\n- `import`: Import classes from Java\n- `loadlib`: Load a Java method, similar to `package.loadlib`\n- `luaify`: Convert Java values to Lua values\n- `method`: Provide an alternative way to call Java methods\n- `new`: Construct a Java object\n- `proxy`: Create a Java object, calls to whose method will be proxied to Lua functions\n- `unwrap`: Return the backing table of a proxy object\n\n### Examples\n\nHere is a simple example on how to correctly initialize new Lua instance.\nThis example will push `message` variable to Lua with value `Hello World from Lua`,\nand then print it using the Java `println`.\n\n```java\npublic static void main(String[] args) {\n    try (Lua L = new Lua51()) {\n        L.set(\"message\", \"Hello World from LuaJava\");\n        L.run(\"java.import('java.lang.System').out:println(message)\");\n    }\n}\n```\n\nAnd [a more advanced \"Hello World\"](https://luajava.iroiro.party/examples/hello-world-mod.html):\n\n```lua\nprint = java.method(java.import('java.lang.System').out,'println','java.lang.Object')\nAnsi = java.import('org.fusesource.jansi.Ansi')\nthread = java.import('java.lang.Thread')(function()\n\n    print(Ansi:ansi():render('@|magenta,bold Hello |@'):toString())\n\nend)\nthread:start()\n```\n\n### More ###\n\nCheck out [AWT Example](https://luajava.iroiro.party/examples/awt.html) for a more complex example.\n\nYou may also have a look at [our tests](./example/src/test/resources).\n\n## Credits ##\n\n * [LuaJava](https://github.com/jasonsantos/luajava)\n * [LibGDX](https://github.com/libgdx/libgdx)\n * [jnigen](https://github.com/libgdx/gdx-jnigen)\n * [Nonlua](https://github.com/deathbeam/jua)\n * [LuaJ](https://github.com/wagyourtail/luaj)\n\n## License ##\n\nCode under [./example](./example) is licensed under [GNU General Public License\nVersion 3](https://www.gnu.org/licenses/gpl-3.0.txt).\n\nOther parts are licensed under [the MIT license](https://opensource.org/licenses/MIT).\nThe project includes code from other projects, whose licenses may be found at [./LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgudzpoz%2Fluajava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgudzpoz%2Fluajava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgudzpoz%2Fluajava/lists"}