Add static install utility for j2se os lib.

This commit is contained in:
James Roseborough
2009-04-03 05:44:57 +00:00
parent 4039127936
commit cd43f00d91

View File

@@ -24,6 +24,7 @@ import java.io.File;
import java.io.IOException;
import org.luaj.lib.OsLib;
import org.luaj.vm.LTable;
/**
* Implementation of the lua os library for J2se
@@ -33,6 +34,13 @@ public class J2seOsLib extends OsLib {
public static int EXEC_INTERRUPTED = -2;
public static int EXEC_ERROR = -3;
/**
* Install the os library using the J2seOsLib class as a factory
*/
public static void install(LTable globals) {
OsLib.install(globals, new J2seOsLib());
}
public J2seOsLib() {
super();
}