diff --git a/README.html b/README.html
index dcfc9564..41dd95a0 100644
--- a/README.html
+++ b/README.html
@@ -68,12 +68,12 @@ Support for lua 5.2.x features:
It also includes miscellaneous improvements over luaj 2.0.x:
+- Better thread safety.
+
- More compatible table behavior.
- Better coroutine-related garbage collection.
+
- Maven integration.
- Better debug reporting when using closures.
- Line numbers in parse syntax tree.
-
- More compatible table behavior.
-
- Better thread safety.
-
- Maven integration.
Luaj 2.0.x
Support for lua 5.1.x features, plus:
@@ -178,7 +178,7 @@ the lua-to-java-bytecode (luajc) compiler is used,
and actually executes faster than C-based lua in some cases.
It is also faster than Java-lua implementations Jill, Kahlua, and Mochalua for all benchmarks tested.
-
+
Run a lua script in Java SE
@@ -201,6 +201,12 @@ To see how luaj can be used to acccess most Java API's including swing, try:
java -cp lib/luaj-jse-3.0-beta3.jar lua examples/lua/swingapp.lua
+
+Links to sources:
+ examples/lua/hello.lua
+ examples/lua/swingapp.lua
+
+
Compile lua source to lua bytecode
@@ -274,7 +280,7 @@ or an InputStream to be loaded as text source "t", or binary lua file "b":
A simple example may be found in
- examples/jse/SampleJseMain.java
+ examples/jse/SampleJseMain.java
@@ -301,7 +307,7 @@ Any files included via require() must also be part of the midlet resour
A simple example may be found in
- examples/jme/SampleMIDlet.java
+ examples/jme/SampleMIDlet.java
@@ -310,7 +316,7 @@ You must include the library lib/luaj-jme-3.0-beta3.jar in your midlet ja
An ant script to build and run the midlet is in
- build-midlet.xml
+ build-midlet.xml
@@ -340,7 +346,7 @@ You must include the library lib/luaj-jse-3.0-beta3.jar in your class pat
A working example may be found in
- examples/jse/ScriptEngineSample.java
+ examples/jse/ScriptEngineSample.java
To compile and run it using Java 1.6 or higher:
@@ -386,24 +392,61 @@ The requires bcel to be on the class path, and the ClassLoader of JSE o
Globals
-The old notion of platform has been replaced with creation of globals.
-Two classes are provided to encapsulate common combinations of libraries.
+The old notion of platform has been replaced with creation of globals.
+The Globals
+class holds global state needed for executing closures as well as providing
+convenience functions for compiling and loading scripts.
+
+Platform
+To simplify construction of Globals, and encapsulate differences needed to support
+the diverse family of Java runtimes, luaj uses a Platform notion.
+Typically, a platform is used to construct a Globals, which is then provided as a global
+environment for client scripts.
JsePlatform
-
-This class can be used as a factory for globals in a typical Java SE application.
+The JsePlatform
+class can be used as a factory for globals in a typical Java SE application.
All standard libraries are included, as well as the luajava library.
The default search path is the current directory,
and the math operations include all those supported by Java SE.
-JmePlatform
+Android
-This class can be used to set up the basic environment for a Java ME application.
+Android applications should use the JsePlatform, and can include the Luajava library
+to simplify access to underlying Android APIs.
+A specialized Globals.finder should be provided to find scripts and data for loading.
+See examples/android/src/android/LuajView
+for an example that loads from the "res" Android project directory.
+The ant build script is examples/android/build.xml.
+
+Applet
+
+Applets in browsers should use the JsePlatform. The permissions model in applets is
+highly restrictive, so a specialization of the Luajava library must be used that
+uses default class loading. This is illustrated in the sample Applet
+examples/jse/SampleApplet.java,
+which can be built using build-applet.xml.
+
+
+JmePlatform
+The JmePlatform
+class can be used to set up the basic environment for a Java ME application.
The default search path is limited to the jar resources,
and the math operations are limited to those supported by Java ME.
All libraries are included except luajava, and the os, io, and math libraries are
limited to those functions that can be supported on that platform.
+MIDlet
+
+MIDlets require the JmePlatform.
+The JME platform has several limitations which carry over to luaj.
+In particular Globals.finder is overridden to load as resources, so scripts should be
+colocated with class files in the MIDlet jar file. Luajava cannot be used.
+Camples code is in
+examples/jme/SampleMIDlet.java,
+which can be built using build-midlet.xml.
+
+
Thread Safety
Luaj 3.0 can be run in multiple threads, with the following restrictions:
@@ -509,7 +552,7 @@ To install dynamically from lua use java-class-based require::
The lua command line utility includes the debug library by default.
-The Luajava Library
+
The JsePlatform.standardGlobals() includes the luajava library, which simplifies binding to Java classes and methods.
It is patterned after the original luajava project.
@@ -757,7 +800,7 @@ For example, to parse a file and print all variable names, use code like:
An example that prints locations of all function definitions in a file may be found in
- examples/jse/SampleParser.java
+ examples/jse/SampleParser.java
@@ -765,7 +808,7 @@ See the Building and Testing
-
Maven integration
+
The main jar files are now deployed in the maven central repository. To use them in your maven-based project, list them as a dependency:
@@ -788,7 +831,7 @@ while for JME projects, use the luaj-jme jar:
An example skelton maven pom file for a skeleton project is in
- examples/maven/pom.xml
+ examples/maven/pom.xml
@@ -820,7 +863,7 @@ Unit test scripts can be found in these locations
A build script for running unit tests and producing code coverage statistics is in
- build-coverage.xml
+ build-coverage.xml
It relies on the cobertura code coverage library.
@@ -836,6 +879,8 @@ Sources are hosted on SourceForge and available via sourceforge.net
SourceForge Luaj Download Area
+The jar files may also be downloaded from the maven central repository, see Maven Integration.
+
Files are no longer hosted at LuaForge.
@@ -954,5 +999,5 @@ These restrictions are mainly a side effect of how the language is defined as al
within literal strings in source files.
Code that is generated on the fly within lua and compiled with lua's load() function
-should work as expected, however, since these strings will never be represented with the
+should work as expected, since these strings will never be represented with the
host's native character encoding.