Results 1 to 5 of 5

Thread: Java Console

  1. #1
    stiwi is offline Member
    Join Date
    May 2010
    Posts
    1
    Rep Power
    0

    Default Java Console

    Hello!

    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...


    Nice greetings
    Stefan

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    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.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by stiwi View Post
    Hello!

    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...


    Nice greetings
    Stefan
    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.

  4. #4
    CHARU_SH is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default

    hello everyone..............

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by CHARU_SH View Post
    hello everyone..............
    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.

Similar Threads

  1. Java console
    By johnjw in forum New To Java
    Replies: 5
    Last Post: 11-28-2008, 01:45 PM
  2. adding the Java Console to a ContentPane
    By naipulb in forum New To Java
    Replies: 1
    Last Post: 06-10-2008, 09:51 AM
  3. Java Swing class capturing output to the console
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-12-2008, 12:24 PM
  4. Help with java console
    By carl in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 03:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •