Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Got input/output error when use System.console().readLine in org.eclipse.core.runtime.applications(System.console().readLine failed on MAC)
Got input/output error when use System.console().readLine in org.eclipse.core.runtime.applications [message #1404883] Wed, 06 August 2014 04:32 Go to next message
George Wang is currently offline George WangFriend
Messages: 14
Registered: July 2011
Location: Beijing
Junior Member

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 use System.console().readLine in org.eclipse.core.runtime.applicatio [message #1415066 is a reply to message #1404883] Tue, 02 September 2014 02:24 Go to previous message
George Wang is currently offline George WangFriend
Messages: 14
Registered: July 2011
Location: Beijing
Junior Member

up up
Previous Topic:How to setup a ProcessFactory?
Next Topic:Advice needed for a Debugger plugin
Goto Forum:
  


Current Time: Fri Apr 26 08:00:32 GMT 2024

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

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

Back to the top