Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.io.Console error on clear() method

807580Oct 27 2009 — edited Oct 27 2009
Hi, I use eclipse and just updated to java 1.6 on my computer. I have a problem with a piece of my code:
public static void clearConsole () { Console console = System.console();
console.clear();
}
My Compiler says that it "cannot find symbol" on symbol "clear()". I have tried using a different compiler, and got pretty much the same error:
javac JavaGameDeck2.java
JavaGameDeck2.java:275: cannot find symbol
symbol  : method clear()
location: class java.io.Console
console.clear();
1 error
I imported java.io.Console, in the beginning of the program, but it won't work! what should I do?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2009
Added on Oct 27 2009
6 comments
3,793 views