Run Tool, End-of-file indicator?

I'm using Windows. When running a java class file from cmd in windows, pressing ctrl+z enters the symbols ^z, and it's seen as what I think is called an 'End-of-file indicator'. It's useful for a situation like this:

while ( input.hasNext() )
        {
            a = input.nextInt();
            
        }

When this generic while-loop is running, you can obviously enter whatever integer and it gets stored in the varaible 'a', and to exit the loop when running the application in cmd, you do what I said above: ctrl+z, press enter, and it exits the while loop. On mac and linux it would be ctrl+d.

But the same is not true in IntelliJ's run tool (I think that's what it's called). Pressing ctrl+z does nothing, and manually inputting "^z" just creates an error (not an integer obviously).
So, does it have a different end-of-file indicator? How would one exit this while loop from the run tool?

4 comments

Seen some similar threads, in previous builds it was not possible apparently. Perhaps it has become possible in one of the more recent builds?

0

No, such an ability hasn't been provided yet for IJ console.

Denis

0

No, it's not in work. Please create corresponding feature request at the tracker.

Denis

0

Please sign in to leave a comment.