Reputation:
Eclipse uses console view as read-only.
How can I type command in console view? Is it possible? E.g: ls
, mvn install
...
Edited:
Thanks Ben and Kelly.
I understand I can interact with Eclipse's console when my application is running. However, I meant I want an embedded console as like as the one in Kate, Dolphin (press F4 in Dolphin)... So I can use bash script in Eclipse's console. Is that possible? Or is there a plugin for that? I have googled but perhaps my keywords were not right...
Edited
Edward has found duplicate question here: Is there an Eclipse plugin to run system shell in the Console?
And it was answered :-)
I don't know how to mark this one as solved. So I place message here, I got the answer.
Edited
But it is not useful. It doesn't have auto complete feature, when I need to type a long file name, or want a hint for a forgotten name,... it is worst :-(
Upvotes: 5
Views: 23137
Reputation: 13858
The Eclipse Console view is used for communicating with an executed program (typically Java, or similar). If you want to use it as a console, as mentioned in the comment under @Ben S's answer, the Target Management Eclipse project provides a view that can be used for that reason. I don't have it installed right now, so I cannot tell you the required plug-in/view name, but I have used it to connect to the local computer and works.
Upvotes: 0
Reputation: 12334
You are trying to think of the Eclipse console as if it were connected to a command-line process. It is actually connected to the JVM used to execute your Java code. Thus, it only shows output that your program sends to System.out
and conversely only is available for input if the Java code you are running is requesting input from System.in
.
A decent exercise would be to write a small Java program that redirects the input and output to a child process of your favorite shell, for example: http://www.devdaily.com/java/edu/pj/pj010016
Upvotes: 2
Reputation: 69342
When the console is waiting for input it shows a green prompt that allows you type.
You can test it out by making a simple console application that reads from standard input.
Upvotes: 2