Got input/output error when I use System.console().readLine in my application [message #1404879] |
Wed, 06 August 2014 00:17  |
Eclipse User |
|
|
|
Hi All,
I encountered a very tricky problem in my RCP application. The problem is I used System.console().readLine() in the class I extended from IAppliation. I got input/output error on MAC. The problem only occurred on mac, on other system works fine.
I have also tried use system.in, failed as well. But I tested in a simple java class, it worked fine.
Any help will be appreciated! Thanks!
Code as following:
import java.io.Console;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
public class CustomWizardApplication implements IApplication {
public Object start(IApplicationContext context) throws Exception {
// BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// String userInput = reader.readLine(); //got input/output error
Console con = System.console();
String userInput1 = con.readLine(); //got input/output error
return IApplication.EXIT_OK;
}
public void stop() {
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.04843 seconds