|
GettingStarted
Geting Started
This page provides instructions for installing JNLua and launching the JNLua console in order to get started with using JNLua. Installing JNLuaJNLua can be downloaded from its project web site. The download directory contains three types of assemblies:
As an alternative, you checkout JNLua from its repository. Tags are provided for each release. Installing the JNLua Java LibraryThe JNLua Java library is provided by a file named jnlua-{version}.jar. This file can be obtained by downloading a bin assembly. Apache Maven is required to build the JNLua Java library manually. Once the JNLua native library and the Lua library are installed on your system (see below), type the following commands: mvn clean mvn javadoc:jar mvn package Installing the JNLua Native LibraryThe JNLua proejct provides pre-built versions of the JNLua native library for the Win32 platform (64-bit and 32-bit). These files can be obtained by downloading a native assembly. Please see Building the Native Library for information on how to build the JNLua native library on other platforms, or do a different build for Win32. Installation DirectoryThe JNLua native library must be placed in a location where is is found by the Java Virtual machine. Typical locations include:
See your JVM documentation for a list of these locations on your platform. As as alternative, you can ensure that the location where you have installed the JNLua native library is on your java.library.path. Installing the Lua LibraryThe JNLua native library requires Lua as a shared library. Depending on your environment, you can install the shared Lua library via a package manager, download it from the LuaBinaries project, or compile the Lua source code into a shared library yourself. Lua VersionJNLua 0.9 requires Lua 5.1. JNLua 1.0 requires Lua 5.2. Installation DirectoryThe Lua library must be placed in a location where is is found when the Java Virtual Machine loads the JNLua native library. Typical locations inlcude:
Launching the JNLua ConsoleTo launch the JNLua console, type the following in the directory where jnlua-{version}.jar is installed: java -classpath jnlua-{version}.jar com.naef.jnlua.console.LuaConsole To exit the console, terminate the input. On Windows, this is accomplished by typing F6 followed by Enter. On Linux, type Ctrl+D. |