--****************************************************************************** --* * --* File: LuaJava_01.lua Revision: 1.0 * --* * --* Purpose: what happens with intermixed accesses to stdout and stderr? * --* * --* Creation: 06.11.2004 Last Modification: 07.11.2004 * --* * --* Platform: IBM-compatible PC running Windows 98SE * --* * --* Environment: Lua 5.0, LuaJava 1.0b3, Java 1.4.2 * --* * --* Author: Andreas Rozek Phone: ++49 (7031) 222305 * --* Bunsenstraße 80/1 Fax: - * --* D-71032 Böblingen EMail: Info@Andreas-Rozek.De * --* Germany * --* * --* URL: http://www.Andreas-Rozek.de/ * --* * --* Copyright: the software is published under the "GNU Lesser General Pub- * --* lic License" (see "http://www.fsf.org/copyleft/lesser.html" * --* for additional information) * --* * --* Comments: (none) * --* * --****************************************************************************** local System = luajava.bindClass("java.lang.System"); println(); println("LuaJava_01 - what happens with intermixed accesses to stdout and stderr?"); println(); System.out:println(" 1: Java -> stdout"); io.stdout:write (" 2: Lua -> stdout\n"); sayln (" 3: LuaJava -> stdout"); System.err:println(" 4: Java -> stderr"); io.stderr:write (" 5: Lua -> stderr\n"); cryln (" 6: LuaJava -> stderr"); println("done"); println();