General question regarding System.out.println

Just for my knowledge fellas,
When you have a few System.out.println's in your code, what happens to the lines written to standard out when you run your application from the executable jar file? I know if you run your app in cmd prompt, then the lines are outputted to the cmd screen, and in Netbeans, in the output section...but where do those lines go when you run the app as an executeable? Are they still written, but there's nothing to show the written lines?
Thanks.
...DJVege...

Just for my knowledge fellas,
When you have a few System.out.println's in your
code, what happens to the lines written to standard
out when you run your application from the executable
jar file?They get written to standard out, usually the console... doesn't matter at all if it's a JAR or not.
I know if you run your app in cmd prompt,
then the lines are outputted to the cmd screen, and
in Netbeans, in the output section...but where do
those lines go when you run the app as an
executeable?cmd screen. Or Java console if you run javaw.

Similar Messages

  • System.out.println in gui--- question

    Hello People.
    First of all, I'm new to the forums, so if it doesn't belong here, plese tell me where to post questions like this.
    The Problem:
    I have a GUI and another class,which contains the Program.
    Here's the code of my class:
    int Battle(String CharName) {
              System.out.println(CharName + " Is fighting agains a monster");
              while (CharHP > 0 && MonsterHP != 0) {
                   MonsterHP = MonsterHP - CharDmg;
                   System.out.println("The monster has " + MonsterHP + "Hitpoints left ");
                   CharHP = CharHP - MonsterDamage;
                   System.out.println(CharName + " has " + CharHP + " Hitpoints left");
              if (MonsterHP == 0) {
                   System.out.println(CharName + "Has lost the fight!");
                   CharEXP = CharEXP + 20;
                   System.out.println("You have gained " + CharEXP + " Exp");
              if (CharHP == 0) {
                   System.out.println("You have lost the fight!");
              return CharHP;
         }So what would be the code to print all the "System.out.println's" here into the gui test area?

    camickr wrote:
    Check out the [Message Console|http://www.camick.com/java/blog.html?name=message-console].
    Just out of curiosity, how do you come up with ideas for all the awesome stuff on your blog?

  • Where to see the System.out.println() messages

    I deploy my application in Oracle9ias . I have some System.out.println() statements in java class files.
    When I run the application I need to know where I can see those println() statements.

    The Member Feedback forum is for suggestions and feedback for OTN Developer Services. This forum is not monitored by Oracle support or product teams and so Oracle product and technology related questions will not be answered. We recommend that you post this thread to the Application Server-General forum. The URL is:
    Oracle Application Server - General

  • Why we use logger instead of System.out.println for debugging?

    Hi,
    why we use logger instead of System.out.println for debugging?
    Regard
    Sankar

    Ya Basha,
    good question....
    You can use the idoc method to transfer the data when you are having an interface between the sap system and the legacy system......
    All the times BDC is not preferable like take the case you developed on upload program with bdc after some days your company thought to go for upgrade the sap vesion from lower version to upper version... in that upgraded version the application may change like sequence of fields or screens at that time you previous bdc program will not work here so u have to develop a new program and and you have to take the things into consideration again...
    where as if you use bapi or idoc method it will support the upgradations...
    in the case of bdc you have to take the data into flat files.... and then upload it to sap system after all the validations done some times the data which is in the flat file is confidential so there is no security if u take such data in flat file any user can chang the data even though if u maintain the data in application server super user can change the data
    where is idoc is fully secured... you can easily establich the interface between the systems and once it is done you can transfer the data with full security because idoc r generated by a program... so there is no manual interaction.....
    I think i gave some useful answer to you
    ~~Guduri

  • Where do Java Embedding "System.out.println()" go? Where is Java Console?

    Assume I embed a "Java Embedding" object in a BPEL process
    and write the following Java code into it:
    System.out.println("Hello BPEL");
    where does this text go when executed? If I remember it well there must be somewhere an AppServer console.
    But where is it exactly ?
    Peter

    Hi Peter,
    The out stream is generally redirect into files in applications servers.
    OC4J : $ORACLE_HOME/opmn/logs/<your_group>~<your_home_name>~<your_group>~1.log
    WebSphere : $LOG_ROOT/SystemOut.log
    JBoss : $SERVER_LOG_ROOT/server.log
    Hope this helps.
    Regards,
    Raphaël
    http://bpelsoa.blogspot.com

  • System.out.println(STX +"HELLO"+ ETX) ; ???

    I hava one question I tried to display String which is begins with a sign "STX - this is a sign 0x02 in Ascii Table and ended with "ETX - this is a sign 0x03 in Ascii Table" using System.out.println, and nothing,
    console was empty. When I deleted STX and ETX i got HELLO. I have question where is a problem. If you know answer on my question please write it.
    Thank you and Regards Sebastian

    I hava one question I tried to display String which is
    begins with a sign "STX - this is a sign 0x02 in Ascii
    Table and ended with "ETX - this is a sign 0x03 in
    Ascii Table" using System.out.println, and nothing,
    console was empty. When I deleted STX and ETX i got
    HELLO. I have question where is a problem. If you
    know answer on my question please write it.
    Thank you and Regards Sebastianhow do you define STX and ETX ?
    either of these should be valid
    public static final char STX = (char)0x02;
    public static final char ETX = (char)0x03;or
    public static final char STX = \u0002;
    public static final char ETX = \u0003;if they still don't work, it may be because these two characters are unprintable

  • Where are all the System.out.printlns sent to?

    I have log4j running but when this fails to load I rely on System.out's to see what went wrong. I checked the application log for the application in application-deployments/<application-name>/home_default_island_1 directory but it doesn't record the System.out's.
    Regards,
    Anthony

    Thanks Avi,
    However the OC4J Home Page is not always the answer to every question. I don't want to sound ungrateful but OAS has way too much documentation. Granted it has alot of features and operating OAS should not be delegated to a lone developer but I can 't be sifting through documentation looking for a simple answer as "Where do System.out.printlns go to"
    I mean simply put OC4J (running inside OAS) has a local log per application application-deployments/<application-name>/home_default_island_1 which I would expect to be the default location for any System.outs to be. Isn't it just logical thinking? I'm not sure exactly what opmn's relationship with OC4J is but from a developer point of view it's a different entity!?!
    For now I'm still refining our development processes for an upcoming project so it looks like I'll be ditching developer testing on OAS full install to running a local OC4J standalone - too much time is wasted deploying an app for a start and there is no easy access to the remote console logs. Also the System.outs in standalone are easily visible anyway.
    Please understand this is not a formal complaint or grudge but a developers desparate cry to try and get a job done.
    Anthony

  • Print System.out.println messages into logs of Weblogic Application Server

    Hi,
    I use Weblogic Application Server 10.3.6 on Windows 7. The Enterprise Application (J2EE) is deployed into the 'AdminServer' of Weblogic. For debugging purpose, I have added a few System.out.println statements.
    I am unable to see the print messages on any of log files available in path 'user_projects > domains > base_domain > servers > AdminServer > logs'. However, I can see them on the 'command' prompt which was used to start the server. How can I get them into one of the log files? What am I missing?
    I tried reading other threads on the forum and as per them 'System.out.println' gets logged onto *.out logs which I am unable to find. Only base_domain.log, AdminServer.log, access.log are available in the location.
    More Specifics:
    Configuration on WLS console 'Home > Servers > AdminServer > Logging'
    Log file name: logs/AdminServer.log
    Min. Severity to log: Notice (tried with Debug as well)
    Advanced Options:
    Logging Implementation: JDK
    Redirect stdout logging enabled: False (tried both options)
    Log file Severity Level: Notice (tried with Debug as well)
    Standard Out Severity Level: Notice (tried with Debug as well)
    Thanks

    Paul,
    I just found this on google:
    'Generally, developers put a lot of System.out.println statements in their code to perform application debugging. Normally, all standard outputs and error outputs are routed to the console where the OC4J server is started. If you want to capture the standard output and error outputs to files for logging/debugging purposes, then you can use the -out and -err options while starting up the Oc4J server to specify which files to use.'.
    http://www.onjava.com/pub/a/onjava/2002/01/16/oracle.html?page=2

  • System.out.println capture to buffer

    Hi All,
    My application runs other application in back. How can I capture system.out.println() written by another application & display via dialog box.
    Like :execl() or execv() function in C runtime library. Where every printf() message printed to passed buffer.
    Thank you,
    Avin Patel

    If i understand your question correctly, you should execute command for you help.html file. The system will run default browser.
    such as:
    void runBrowser(String file)
    {String cmd = null;   
         Process p;   
              try  {       
                   String os = System.getProperty("os.name");            
                   if (os != null && os.startsWith("Windows")) {           
                        if (os.startsWith("Windows 9") || os.startsWith("Windows Me")) 
                        // Windows 9x/Me               
                             cmd = "start " + file;
    else
                        // Windows NT/2000/XP               
                             cmd = "cmd /c start " + file;
    p = Runtime.getRuntime().exec(cmd);            
    catch(IOException x)
    // couldn't exec browser
    System.err.println("Could not invoke browser, command=" + cmd);
    }

  • System.out.println not showing up in the console

    Hi,
    I've some System.out.println statements in a static block in a Stateless
    Session Bean. I could not see these outputs in the Weblogic console. I'm
    using Weblogic 5.1 Any one faced this problem before? any help is
    appreciated.
    Thanks & Regards,
    Nithi.

    Take a look in the weblogic log files they might be redirecting std out.
    "Ryan LeCompte" <[email protected]> wrote:
    >
    Hello Nithi,
    I'm all out of ideas, unfortunately! However, check out the following
    links for
    some possible insight into the problem:
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=60&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3d3df18e%40newsgroups.bea.com&rnum=69
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=70&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3977417b%40newsgroups.bea.com&rnum=71
    http://groups.google.com/groups?q=System.out.println+5.1+WebLogic&start=200&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3bc20346%241%40newsgroups.bea.com&rnum=209
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi Ryan,
    Thanks for your reply and sorry for the long silence. I was on vocation.
    Thre problem still remains.I'm very sure that the EJB
    is deployed by WebLogic as I'm able to call some methods.
    and I'm also calling EJB methods from Servlet. But my
    System.out.println statments work fine in the Servlet and
    not inside EJB (or anyother classes used by EJB).
    Any one has faced similar problems? BTW am using WebLogic 5.1
    Thanks in advance,
    Regards,
    Nithi.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    Hello Nithi,
    I find it strange that your System.out.println statements are beingexecuted from
    within your servlets, but not in your stateless session bean. Are
    you
    positive
    that your EJB is being located and deployed by WebLogic? The statementsin
    your
    static { } block should be executed as soon as the WebLogic class
    loader
    finds
    the class and loads it into the JVM. I would suggest examining theconsole
    and
    try to determine if your EJB is in fact being deployed. Are you invokingmethods
    on the EJB inside of your servlets? Are you using any logging frameworkfrom within
    the EJBs which would redirect output to a file?
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi Ryan,
    Thanks for your reply. The setting in the weblogic.properties is
    as
    follows.
    weblogic.system.enableConsole=true
    So, that tells me that I should see all the System.out.printlns right?
    (Pleasecorrect me if I'm wrong). I can see all the System.out.println
    from
    my
    servletand not from the Session Bean (even if the System.out.println
    is
    outside
    static block).
    Please let me know your thoughts.
    Thanks & Regards,
    Nithi.
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    Hello Nithi,
    Are you sure that you don't have WebLogic configured to redirect
    all
    messages
    to a file instead of the console? Are you able to see yourSystem.out.println
    statements when placed within other methods of your stateless sessionbean? Please
    be a bit more specific.
    Thank you,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Nithi Rajan" <[email protected]> wrote:
    Hi,
    I've some System.out.println statements in a static block in a
    Stateless
    Session Bean. I could not see these outputs in the Weblogic console.
    I'm
    using Weblogic 5.1 Any one faced this problem before? any helpis
    appreciated.
    Thanks & Regards,
    Nithi.

  • System.out.println crashes wireless toolkit

    I'm using system.out.println calls to create debugging commands to test my application. They mostly work but if I try to print out a lot at once the wireless toolkit crashes.
    This is all on my computer, not on any mobile device.
    The error I get is:
    Exception in thread "Child process stdout copier" java.lang.ClassCastException: sun.java2d.NullSurfaceData cannot be cast to sun.java2d.d3d.D3DSurfaceData
         at sun.java2d.d3d.D3DRenderer.copyArea(D3DRenderer.java:55)
         at sun.java2d.d3d.D3DSurfaceData.copyArea(D3DSurfaceData.java:638)
         at sun.java2d.SunGraphics2D.doCopyArea(SunGraphics2D.java:1986)
         at sun.java2d.SunGraphics2D.copyArea(SunGraphics2D.java:1968)
         at javax.swing.BufferStrategyPaintManager.copyArea(BufferStrategyPaintManager.java:315)
         at javax.swing.RepaintManager.copyArea(RepaintManager.java:1228)
         at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1604)
         at javax.swing.JViewport.windowBlitPaint(JViewport.java:1573)
         at javax.swing.JViewport.setViewPosition(JViewport.java:1118)
         at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:1027)
         at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1016)
         at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
         at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
         at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
         at javax.swing.JScrollBar.setValue(JScrollBar.java:446)
         at com.sun.kvem.toolbar.MainWindow$ConsoleStream.write(Unknown Source)
         at java.io.PrintStream.write(PrintStream.java:430)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
         at com.sun.kvem.environment.StreamCopier.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)Am I doing something wrong or is this a bug in the toolkit?
    Once I get this exception the whole toolkit becomes unresponsive and I have to close it and re-open.

    mydreamgirl, welcome to the forum. Please don't post in threads that are long dead and don't hijack another poster's thread. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.
    db

  • How do you change system.out.println colour?

    Hi, I am developing some basic rmi client/server applications, I have an 2D array on a central server being read/written by remote clients. all the development is using system.out. statements at the moment (hopefully being replaced by GUI later) my question is when a client remote calls a read operation, and reads an array location, eg x3, y4 I want to print the location contents in a different colour to indicate the read, at the moment the displayArray() simply has nested for loops to cycle through the array and System.out.println statements to get it to the screen. I wonder is there a simple way to change the colour of system.out type statements? thanks for any help

    I could be wrong, but I don't think that is possible. The System.out and other streams are just streams of characters, and doesn't contain any data about the characters. You could possibly get it to work if you knew which terminal the stream was going to and if the terminal had escape commands that could set colors. BBS browsers have that functionality, but I think that would be a hard path to follow.
    If you are printing out a lot of data and need some color to aid it's readability, try printing directly to your graphic context:
    Graphics g = getGraphics();
    g.setColor(Color.white);
    g.drawString("Hello",100,100);

  • System.out.println in J2ME

    Hi...
    My question is very simple. When we write System.out.println("ok") ; it's prints on sun wtk toolkit window but when we run code on actual mobile where it prints.
    Hope you understand.

    hi
    iam using xml parser to display document it displaying on window it should dislpay on emulater screen
    My question is very simple. When we write System.errt.println("ok") ; it's prints on sun wtk toolkit window but when we run code on actual mobile where it prints.
    Hope you understand.

  • System.out.println in iPlanet 6.0

    Hi..All,
    The System.out.println stmt would print out the message when using iPlanet4.x whereas its not doing so when using iPlanet6.0(solaris). What changes/modifications do I have to do to achieve the same.
    Regards,
    Praveen

    Add the following line to your magnus.config file and restart the server.
    Rememeber, to change the server name and path.
    Init fn="nt-console-init" stderr="C:/iPlanet/Servers/https-servername/logs/stderr" stdout="C:/iPlanet/Servers/https-servername/logs/stdout" EarlyInit="yes"

  • System.out.println in Servlets/JSPs

    Hi,
    Which file and directory in JDeveloper 10g (10.1.3.0) on windows does the output of System.out.println get logged to? THanks in advance.
    regards,

    Goes to standard out, not a file. So if you're running the embedded server you will see it in your Embedded Server Console window. However, you should never be using system.out.println in a servlet/jsp. Instead use commons logging or log4j to get log messages.

Maybe you are looking for

  • How do I by default save new documents in a particular folder?

    In OS10.3.9, how do I by default save new documents in a particular folder? I have created a new folder called new docs which I have put in the dock, and would like to save all new documents in that folder... Thanks, Michael

  • HP Recovery DVD error "0130-UUF-AB4"

    1. HP G42-458TX NOTEBOOK PC Product Name: LD915PA 2. Windows 7 Premium 64-bit 3. error "0130-UUF-AB4" 4. Installing on new hard disk. I have installation error problem " 0130-UUF-AB4" using HP System Recovery DVD bought from HP service Centre. Kindly

  • Parsing xml in mapping

    hello, i work with the sap business partner in xi a part of payload look like this:                   <PersonData>                      <GivenName updateIndicator=""/>                      <FamilyName updateIndicator=""/>                      <BirthN

  • Blew out Final Cut registration (legit); number won't work, how do I get reset

    For the second time in the last year I have upgraded my MacPro (to a newer tower), I just physically transferred my internal drives to the new tower (in a not well thought out test) and seem to have blown out my app registration (legit); how do I get

  • Error using View Object in a optionList ?

    Hello, I'm use JDeveloper 9.0.3, BC4J+UIXml, and I have a Create form with a optionList tag, populating with a Object View. I create a Object View called TipoLocalView. My code: <bc4j:messageChoice name="Tipo" attrName="SeqTipoLocalCampus" prompt="Ti