本文整理了Java中bsh.Interpreter.redirectOutputToFile()
方法的一些代码示例,展示了Interpreter.redirectOutputToFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interpreter.redirectOutputToFile()
方法的具体详情如下:
包路径:bsh.Interpreter
类名称:Interpreter
方法名:redirectOutputToFile
暂无
代码示例来源:origin: beanshell/beanshell
static void staticInit()
{
try {
Console.systemLineSeparator = System.getProperty("line.separator");
Console.debug = System.err;
DEBUG.set(Boolean.getBoolean("debug"));
TRACE = Boolean.getBoolean("trace");
COMPATIBIILTY = Boolean.getBoolean("bsh.compatibility");
String outfilename = System.getProperty("outfile");
if ( outfilename != null )
redirectOutputToFile( outfilename );
} catch ( SecurityException e ) {
System.err.println("Could not init static:"+e);
} catch ( Exception e ) {
System.err.println("Could not init static(2):"+e);
} catch ( Throwable e ) {
System.err.println("Could not init static(3):"+e);
}
}
代码示例来源:origin: jitlogic/zorka
static void staticInit()
{
/*
Apparently in some environments you can't catch the security exception
at all... e.g. as an applet in IE ... will probably have to work
around
*/
try {
systemLineSeparator = System.getProperty("line.separator");
debug = System.err;
DEBUG = Boolean.getBoolean("debug");
TRACE = Boolean.getBoolean("trace");
LOCALSCOPING = Boolean.getBoolean("localscoping");
String outfilename = System.getProperty("outfile");
if ( outfilename != null )
redirectOutputToFile( outfilename );
} catch ( SecurityException e ) {
System.err.println("Could not init static:"+e);
} catch ( Exception e ) {
System.err.println("Could not init static(2):"+e);
} catch ( Throwable e ) {
System.err.println("Could not init static(3):"+e);
}
}
内容来源于网络,如有侵权,请联系作者删除!