Menu

#52 Console.java

open
nobody
None
5
2005-10-16
2005-10-16
No

Within the two Writers writerSTDOUT and writerSTDERR
the function append from the global class is used. This
will break with Java 5.0 because the Writer has a
function append itself. You could solve the problem by
adding Console.this. before the append like shown
beneth. This would allow people using JDK 5.0 to use
the latest stable version.

private Writer writerSTDOUT = new Writer()
{
public void close() { }

public void flush()
{
repaint();
}

public void write( char cbuf[], int off, int len )
{
Console.this.append(new String(cbuf, off, len),
outputColor);
}
};

Discussion


Log in to post a comment.

MongoDB Logo MongoDB