I have a simple question...
I want a Java jar file which copys the whole content of the Java Console in a text file by executing this jar file.
I just can read out one line, but I need the whole informtation from the console in a text file.
Please help me...
i don't really understand what it is you are trying do do. such as a general purpose read what ever was in the java console (that thing that is in the applet in a web browser), or do you mean the system.out console when running a program in a command line ?
one idea i had, what if you used a logging framework, such as slf4j and logback (or commons-logging and log4j I guess), where the application would run everything through a logger mechanism, which is configured to write to to a console and/or a logging text file?
if you were meaning to have a .jar file run after some other arbitrary program was ran on the system console to capture that program's output, i do not know of any java specific way to do that, since consoles are largely system depenent right (xterm, konsole, windows cmd). if this is what you meant, perhaps a jar that reads standard input and writes to a text file, but this would be the same as shell redirection or the unix "tee" command.
Your questions is not much clear actually. Could you please explain your requirement bit more? JAR files and building the application is two different things. Build up a JAR file is not the first step in your way.
Originally Posted by stiwi
DO NOT post the rubbish things in the forum. If you've a question please ask it more clearly, in the relevant sub-forum. Please pay you attention on it, you may get band here in the forum, if you do this continuously.
Originally Posted by CHARU_SH