0

Just for the Curiosity,can we print the output from eclipse console to command prompt,like I know there is a set.out method,but don't know hot to do it exactly.Is there a possible way ?

Using setOut method,to a different console and not to a file

user3239652
  • 775
  • 2
  • 9
  • 23
  • 1
    I don't understand what you are asking. Do you want to use an external console instead of the built-in one? – Jason C Feb 26 '14 at 02:57
  • Exactly,instead of eclipse console,the cmd prompt,like the default way we used to do. – user3239652 Feb 26 '14 at 03:00
  • possible duplicate of [Eclipse - Runing programs not in the native eclipse console](http://stackoverflow.com/questions/908488/eclipse-runing-programs-not-in-the-native-eclipse-console) – Jason C Feb 26 '14 at 03:00
  • no I was thinking whether a Java program could be written for that? – user3239652 Feb 26 '14 at 03:03
  • 1
    That contradicts what you just said you wanted... you may wish to clarify your question with an example, as well as a description of what you've tried so far. – Jason C Feb 26 '14 at 03:08

1 Answers1

0

You can redirect eclipse console output to a file (like this : How can we redirect a Java program console output to multiple files?) and, in another console window, from outside eclipse, you can (linux/cygwin) do something like tail -f on this file.

Notice that this does not mean eclipse will listen to what you type in your external console window.

Community
  • 1
  • 1
Leo
  • 6,480
  • 4
  • 37
  • 52
  • 1
    That's not necessary, you can directly configure Eclipse to use an alternate console instead of the built-in one. – Jason C Feb 26 '14 at 03:00