How can I use modules with LuaJ?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/javahelp

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Scout APM - Truly a developer’s best friend
  • talent.io - Download talent.io’s Tech Salary Report
  • luaj

    Lightweight, fast, Java-centric Lua interpreter written for JME and JSE, with string, table, package, math, io, os, debug, coroutine & luajava libraries, JSR-223 bindings, all metatags, weak tables and unique direct lua-to-java-bytecode compiling.

    I'm getting an exception that the lua interpreter cannot find the "helper" module, and I'm not sure why. I'm reading the ReadMe on their GitHub page about require, https://github.com/luaj/luaj, in the Libraries of Java Functions section, and there isn't anything about calling other lua files. Do I need to load each of them with globals.loadfile? I'm not exactly sure where this is going wrong, I'd assume the interpreter would understand the require keyword and look for a helper.lua file.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts