Some threads asked how to use the "Interactive Console" in Eclipse since you cannot type anything in this console.
Some suggested you can "Display view" to execute code.
So what is the purpose of the "Interactive Console" then?
The Console view displays the output of the utilities invoked when building a project or the programs output when running/debugging. Click Window > Preferences. Expand C/C++ and Build, then click Console. To display information on the latest build only, select the Always clear console before building check box.
Eclipse allows running an application in Debug mode which helps with stepping through each line of code in a program. Eclipse also provides a Debug Perspective which is a set of views grouped together that help inspect code and make the debugging process very effective.
A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.
On the menu bar in eclipse, go to Window->Show View->Console. When you run the program, that console window should be where your System.
Eclipse doesn't have an "Interactive Console" in it's default installation. It just has a "Display" view that you can use to execute Java code in debug mode in the scope of the current breakpoint (to evaluate expressions or to change data)
If you have an "Interactive Console", it's most likely a view from a plugin. I've read that a Google plugin might provide it. Or maybe a plugin for a scripting language like JRuby or Groovy.
If you say you have an "Interactive Console" and cannot type into it, then I suspect you're not in the right mode for the view to be active (maybe you're not working with the scripting language that provides the view).
Im sorry but the accepted answer is not correct.
The console in Eclipse is interactive, when a running application reads from the Console Input Stream.
It is not meant to be a feature of Eclipse to generally aid in debugging, it is meant to allow console based Java applications to read input from the user when debugging (as in I can type into a console prompt).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With