Home » Language IDEs » Java Development Tools (JDT) » 'eof' using the keyboard in console view
'eof' using the keyboard in console view [message #89506] |
Wed, 27 August 2003 05:15  |
Eclipse User |
|
|
|
Originally posted by: j.a.horsmeier.wanadoo.nl
Greetings and salutations,
the subject line says it all: how do I generate an eof-condition using
the keyboard? I've tried the obvious (ctrl-D, ctrl-Z, escape etc.), I read
the help pages, I've selected about every menu item, I yelled at my screen,
but I couldn't find it; My excuse could be that I'm just beginning to use
the eclipse IDE, but I'm probably just blind. Can some kind soul help me out?
thanks in advance and kind regards,
Jos
|
|
| |
Re: 'eof' using the keyboard in console view [message #90214 is a reply to message #90112] |
Thu, 28 August 2003 10:57   |
Eclipse User |
|
|
|
Originally posted by: j.a.horsmeier.wanadoo.nl
"Daniel Megert" <daniel.megert@gmx.net> wrote in message news:bil04h$4sa$4@eclipse.org...
> Jos A. Horsmeier wrote:
>
> >Greetings and salutations,
> >
> > the subject line says it all: how do I generate an eof-condition using
> >the keyboard? I've tried the obvious (ctrl-D, ctrl-Z, escape etc.), I read
> >the help pages, I've selected about every menu item, I yelled at my screen,
> >but I couldn't find it; My excuse could be that I'm just beginning to use
> >the eclipse IDE, but I'm probably just blind. Can some kind soul help me out?
> >
> You can't insert control characters with the Text or Java editor.
Thank you for replying.
I apologize for being so vague; When a program reads from the System.in
InputStream, a ctrl-D key sequence (using, say, any Unix system) or a ctrl-Z
(using any dos/windows system) causes an end of file condition on this input
stream. My question is -- using the Eclipse console during debugging/running
in the workbench, how do I cause this event to happen, i.e. what do I have
to do to notify the input stream (attached to that console) that an
end of file condition happened?
kind regards,
Jos
|
|
|
Re: 'eof' using the keyboard in console view [message #90244 is a reply to message #90214] |
Thu, 28 August 2003 11:04   |
Eclipse User |
|
|
|
We could not find means to send the control chars from the console to the
running program.
The workaround is to set the Java executable on the JRE tab of your Java
Application launch configuration.
Set it to java (instead of javaw), and you will get your own window to enter
your key sequences in
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=13524 for more details
HTH
Darins
"Jos A. Horsmeier" <j.a.horsmeier@wanadoo.nl> wrote in message
news:bil57n$cmt$1@eclipse.org...
> "Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:bil04h$4sa$4@eclipse.org...
> > Jos A. Horsmeier wrote:
> >
> > >Greetings and salutations,
> > >
> > > the subject line says it all: how do I generate an eof-condition
using
> > >the keyboard? I've tried the obvious (ctrl-D, ctrl-Z, escape etc.), I
read
> > >the help pages, I've selected about every menu item, I yelled at my
screen,
> > >but I couldn't find it; My excuse could be that I'm just beginning to
use
> > >the eclipse IDE, but I'm probably just blind. Can some kind soul help
me out?
> > >
> > You can't insert control characters with the Text or Java editor.
>
> Thank you for replying.
>
> I apologize for being so vague; When a program reads from the System.in
> InputStream, a ctrl-D key sequence (using, say, any Unix system) or a
ctrl-Z
> (using any dos/windows system) causes an end of file condition on this
input
> stream. My question is -- using the Eclipse console during
debugging/running
> in the workbench, how do I cause this event to happen, i.e. what do I have
> to do to notify the input stream (attached to that console) that an
> end of file condition happened?
>
> kind regards,
>
> Jos
|
|
|
Re: 'eof' using the keyboard in console view [message #90393 is a reply to message #90244] |
Thu, 28 August 2003 12:34   |
Eclipse User |
|
|
|
Originally posted by: j.a.horsmeier.wanadoo.nl
"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message news:bil5kj$d5s$1@eclipse.org...
> "Jos A. Horsmeier" <j.a.horsmeier@wanadoo.nl> wrote in message
> news:bil57n$cmt$1@eclipse.org...
> > "Daniel Megert" <daniel.megert@gmx.net> wrote in message
> news:bil04h$4sa$4@eclipse.org...
> > > Jos A. Horsmeier wrote:
> > > > the subject line says it all: how do I generate an eof-condition
> > > >using the keyboard? I've tried the obvious (ctrl-D, ctrl-Z, escape etc.),
> > > You can't insert control characters with the Text or Java editor.
> > I apologize for being so vague; When a program reads from the System.in
> > InputStream, a ctrl-D key sequence (using, say, any Unix system) or a
> > ctrl-Z (using any dos/windows system) causes an end of file condition on this
> > input stream. My question is -- using the Eclipse console during
> > debugging/running in the workbench, how do I cause this event to happen, i.e.
> > what do I have to do to notify the input stream (attached to that console)
> > that an end of file condition happened?
> We could not find means to send the control chars from the console to the
> running program.
> The workaround is to set the Java executable on the JRE tab of your Java
> Application launch configuration.
> Set it to java (instead of javaw), and you will get your own window to enter
> your key sequences in
>
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=13524 for more details
Thank you very much for replying. Theoretically I perfectly well understand
what you're talking about. Sending a 'ctrl-Z' (or whatever) does not cause the
wanted event on the receiving end (the redirected System.in stream); it's the
actual keyboard 'input driver' that must cause the event to happen ...
So far so good, but please be gentle with me, I just started using Eclipse,
and so far I like it a lot, but you've totally lost me when you wrote:
'set the Java executable on the JRE tab of your Java Application launch configuration. Set it to java (instead of javaw)'
Again. theoretically I understand what you're talking about -- a new console
will be attached to the System.in stream so the actual 'keyboard stream' will
be able to generate this eof-event. But for the sake of my sanity, please
give me a simple 'go_here>go_left>press_this>ask_ms_jones>select_that' route
description, because I simply couldn't find the appropriate dialog options
you briefly described before. FYI I've installed Eclipse v.2.1.1. Build 200306271545
(if that is any help).
Thanks in advance and please don't consider me a clumsy oaf ;-)
kind regards,
Jos
|
|
| |
Re: 'eof' using the keyboard in console view [message #91267 is a reply to message #90408] |
Mon, 01 September 2003 11:53  |
Eclipse User |
|
|
|
Originally posted by: j.a.horsmeier.wanadoo.nl
"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message news:bilbj4$kfa$1@eclipse.org...
>
> > 'set the Java executable on the JRE tab of your Java Application launch
> configuration. Set it to java (instead of javaw)'
> >
> > Again. theoretically I understand what you're talking about -- a new
> console
> > will be attached to the System.in stream so the actual 'keyboard stream'
> will
> > be able to generate this eof-event. But for the sake of my sanity, please
> > give me a simple 'go_here>go_left>press_this>ask_ms_jones>select_that'
> route
> > description, because I simply couldn't find the appropriate dialog options
> > you briefly described before. FYI I've installed Eclipse v.2.1.1. Build
> 200306271545
> > (if that is any help).
> >
>
> Run menu> Debug...
> In the left listing of Configuration select you Java Application launch
> configuration
> Select the JRE tab on the right
> Select an Alternate JRE
> Set the Java executable to the alternate of "java"
Thanks again for replying; I found the appropriate dialogs and created
a new (alternate) JRE and specified a java.exe process for debug usage.
All's fine so far; when I actually start debugging my current project,
java.exe starts (I can see it in the process table) but no console pops
up. When I terminate the debug session the same java.exe image stops
also (it is removed from the process list). But during this all the same
eclipse console is used, i.e. still no way to generate an eof event
using the keyboard. Any ideas? BTW, if I simply enter 'java.exe' in a
simple 'run' menu, I can see a console pop up shortly, displaying the
usage text of java, which all makes sense. I feel so silly ...
> Sorry I was obtuse...when you have used Eclipse for soo long you start
> talking in Eclipsese :-)
I recognize that. :-) My little problem now is that I want to debug my
home brew context sensitive grammar parser and I want to do that inter-
actively, i.e. I really need to be able to generate an eof-event. My
little workaround (telling the lexer that '@@@' (or something else
silly) is equivalent to an eof-condition) does the job, but I find it
a bit clumsy ...
kind regards,
Jos
|
|
|
Goto Forum:
Current Time: Fri Apr 18 21:59:57 EDT 2025
Powered by FUDForum. Page generated in 0.24749 seconds
|