Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Generating End of File from Keyboard
Generating End of File from Keyboard [message #201649] Thu, 21 April 2005 18:22
Eclipse UserFriend
Originally posted by: DPante.aol.com

When running a stand-alone java application from within the Console
window, how can EOF be detected from a read. When the application is run
directly under DOS or UNIX, EOF is generated when Control Z (DOS/Windows)
or Control D (UNIX/Linux) is entered. However, when run within the
Console window of Eclipse, these control characters do not have any
effect. Specifically, what would need to be entered from the keyboard
(standard input) to satisfy the following read:

int c;

while((c = System.in.read()) != -1)
{
// process character here
// terminate loop on EOF
}
Previous Topic:External class folder in custom dynamic build library, why not possible?
Next Topic:Add java project to dependencies (required projects) of plug-in
Goto Forum:
  


Current Time: Mon Dec 30 16:44:59 GMT 2024

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

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

Back to the top