Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Got input/output error when I use System.console().readLine in my application
Got input/output error when I use System.console().readLine in my application [message #1404879] Wed, 06 August 2014 04:17 Go to next message
George Wang is currently offline George WangFriend
Messages: 14
Registered: July 2011
Location: Beijing
Junior Member

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() {
}

}
Re: Got input/output error when I use System.console().readLine in my application [message #1405301 is a reply to message #1404879] Thu, 07 August 2014 03:37 Go to previous message
George Wang is currently offline George WangFriend
Messages: 14
Registered: July 2011
Location: Beijing
Junior Member

up up up
Previous Topic: launch a different splash screen for rcp app during runtime
Next Topic:how to use -showSplash command line argument??
Goto Forum:
  


Current Time: Fri Mar 06 07:36:11 GMT 2015

Powered by FUDForum. Page generated in 0.10385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software