FileDocCategorySizeDatePackage
Redirect.javaAPI DocExample638Sat Mar 06 14:57:56 GMT 2004None

Redirect

public class Redirect extends Object
"Redirect" or reassign some standard descriptors.
author
Ian F. Darwin, http://www.darwinsys.com/
version
$Id: Redirect.java,v 1.4 2004/03/06 20:57:56 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		//+
		String LOGFILENAME = "error.log";
		System.setErr(new PrintStream(new FileOutputStream(LOGFILENAME)));
		System.out.println("Please look for errors in " + LOGFILENAME);
		// Now assume this is somebody else's code; you'll see it writing to stderr...
		int[] a = new int[5];
		a[10] = 0;	// here comes an ArrayIndexOutOfBoundsException
		//-