diff --git a/src/core/org/luaj/vm2/lib/DebugLib.java b/src/core/org/luaj/vm2/lib/DebugLib.java index 860771c9..17001b3a 100644 --- a/src/core/org/luaj/vm2/lib/DebugLib.java +++ b/src/core/org/luaj/vm2/lib/DebugLib.java @@ -72,8 +72,12 @@ import org.luaj.vm2.Varargs; * @see Lua 5.2 Debug Lib Reference */ public class DebugLib extends TwoArgFunction { - public static final boolean CALLS = (null != System.getProperty("CALLS")); - public static final boolean TRACE = (null != System.getProperty("TRACE")); + public static boolean CALLS; + public static boolean TRACE; + static { + try { CALLS = (null != System.getProperty("CALLS")); } catch (Exception e) {} + try { TRACE = (null != System.getProperty("TRACE")); } catch (Exception e) {} + } private static final LuaString LUA = valueOf("Lua"); private static final LuaString QMARK = valueOf("?");