Command window question

Is there a way i can catch what is being displayed in the command window? I have a class that creates an instance of another and in this second class i have some System.out.printlnes - i need to display them in my swing app (first class) but cant since i dont know how to either get the 2nd class to pass it back to update the screen or how to get access on the command window.
My swing class extends JFrame and the second class does not extend anything .... the application starts running from the swing class ---- any ideas????
Kind Regards

You can redirect System.out. Just call System.setOut(...), and add a new OutputStream. I think you would be able to use piped streams. Add a PipedOutputStream to System.out, and listen to the PipedInputStream you added to PipedOutputStream.
I think it would be easier if you just changed all your System.out.prints in the class to call a method on your frame calls.

Similar Messages

  • Output jframe information to command window

    Hi all I have a program that tracks the assets of a customer, kind of like a cart that holds cds, appliances, etc...
    I wanted to be able to print out the results to the command window after they enter the number of how many items from what the user enters after they press "current status" or if they "delete" their current items. I want it to keep doing this until they close the window and exit the program. People have told me to add the System.out.println to where it says "delete" or "current status" but Im not sure how to add it in I will attach the code here. Thanks
    import java.awt.Color;
    import java.awt.GridLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class TestProgram extends JFrame implements ActionListener{
       JLabel column1, column2;
       JLabel totalItems, totalCost;
       JLabel serialNum;
       JLabel electronics, autos, furnitures, cds;
       JButton TrackAssets, delete;
       JPanel panel;
       JTextField electronicsAsset, autosAsset, furnituresAsset, cdsAsset;
       JTextField serialNumber;
       JTextArea items, cost;
       // constructor to initialize the top variables/fields
       public TestProgram()
             column1 = new JLabel("Select Items");
         column2 = new JLabel("Specify Quantity");
         electronics = new JLabel("Electronics");
         electronicsAsset = new JTextField();
         electronicsAsset.addActionListener(this);
         autos = new JLabel("Autos");
         autosAsset = new JTextField();
         autosAsset.addActionListener(this);
         furnitures = new JLabel("Furnitures");
         furnituresAsset = new JTextField();
         furnituresAsset.addActionListener(this);
         cds = new JLabel("Compact Discs");
         cdsAsset = new JTextField();
         cdsAsset.addActionListener(this);
         serialNum = new JLabel("Serial Number input here");
         serialNumber = new JTextField();
         electronicsAsset.setNextFocusableComponent(serialNumber);
    //Create labels and text area components
         totalItems = new JLabel("Total Items:");
         totalCost = new JLabel("Total Cost:");
         items = new JTextArea();
         cost = new JTextArea();
    //Create buttons and make action listeners
         TrackAssets = new JButton("Current Status");
         TrackAssets.addActionListener(this);
         delete = new JButton("Delete all");
         delete.addActionListener(this);
    //Create a panel for the components
         panel = new JPanel();
    //Set panel layout to 2-column grid
    //on a white
         panel.setLayout(new GridLayout(0,4));
         panel.setBackground(Color.white);
    // add details
         getContentPane().add(panel);
         panel.add(column1);
         panel.add(column2);
         panel.add(electronics);
         panel.add(electronicsAsset);
         panel.add(autos);
         panel.add(autosAsset);
          panel.add(furnitures);
          panel.add(furnituresAsset);
          panel.add(cds);
          panel.add(cdsAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(totalItems);
         panel.add(items);
         panel.add(totalCost);
         panel.add(cost);
         panel.add(serialNum);
         panel.add(serialNumber);
         panel.add(delete);
         panel.add(TrackAssets);
       public void actionPerformed( ActionEvent event ){
                 // variables for method actionPerformed
                 String output, output2;
                 Object source = event.getSource();
                 Integer electronicsNo, autosNo, furnituresNo, cdsNo, serialNum;
                 // class responsible for showing different items
                 AssetTracker tracker = new AssetTracker();
                 Double cost;
                 // program is instance of TestProgram creates a new file
                 TestProgram program = new TestProgram();
                // if they track assets...
                if(source == TrackAssets){
                  tracker.serialNum = serialNumber.getText();
                  tracker.electronics = electronicsAsset.getText();
                  tracker.autos = autosAsset.getText();
                  tracker.furnitures = furnituresAsset.getText();
                  tracker.cds = cdsAsset.getText();
             if(tracker.electronics.length() > 0){
                       //statement that might throw an exception
                       try{
                           electronicsNo = Integer.valueOf(tracker.electronics);
                           tracker.itotal += electronicsNo.intValue();
                         //find invalid number     
                         catch(java.lang.NumberFormatException e){
                           electronicsAsset.setText("Invalid Value");
                       else {
                             tracker.itotal += 0;
             if(tracker.autos.length() > 0){
                        //find invalid again
                         try{
                      autosNo = Integer.valueOf(tracker.autos);
                      tracker.itotal += autosNo.intValue();
               catch(java.lang.NumberFormatException e){
                      System.out.println("Invalid Value");
             else {
          tracker.itotal += 0;
        if(tracker.furnitures.length() > 0){
           //seek invalid numbers
         //statement that might throw an exception.
          try{
            furnituresNo = Integer.valueOf(tracker. furnitures);
            tracker.itotal +=  furnituresNo.intValue();
        // statements to be executed if a matching Java exception occurs in try.
          catch(java.lang.NumberFormatException e){
             furnituresAsset.setText("Invalid Value");
             else {
          tracker.itotal += 0;
        if(tracker.cds.length() > 0){
         //check then find invalid
          try{
            cdsNo = Integer.valueOf(tracker.cds);
            tracker.itotal += cdsNo.intValue();
          catch(java.lang.NumberFormatException e){
            cdsAsset.setText("Invalid Value");
          else {
          tracker.itotal += 0;
        // display
         serialNum = new Integer(tracker.itotal);
         output = serialNum.toString();
         this.items.setText(output);
         tracker.icost = (tracker.itotal * 300.00);
         cost = new Double(tracker.icost);
         output2 = cost.toString();
         this.cost.setText(output2);
       // electronics, autos, furnitures, cds
       // if user delete all items from assets
       if(source == delete){
         serialNumber.setText("");
         electronicsAsset.setText("");
         autosAsset.setText("");
         furnituresAsset.setText("");
         cdsAsset.setText("");
         serialNumber.setText("");
         tracker.icost = 0;
         cost = new Double(tracker.icost);
         output2 = cost.toString();
         this.cost.setText(output2);
         tracker.itotal = 0;
         serialNum = new Integer(tracker.itotal);
         output = serialNum.toString();
         this.items.setText(output);
      // main method
      public static void main( String[] args )
            TestProgram frame = new TestProgram();
              // title of JFrame
              frame.setTitle("Asset tracking program");
            // mew window created
            WindowListener l = new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                            System.exit(0);// exit
            // add window from package then show window
            frame.addWindowListener(l);
            frame.pack();
            frame.setVisible(true);

    I don't understand the question. Are you telling us you don't understand how to use System.out.println(...);? How do you debug programs without using this method?
    Usually the first program someone learns to write is something like:
    public static void main(String[] args)
        System.out.println("Hello World");
    after they press "current status" or if they "delete" their current itemsYou want to do some activity when the above actions occur. You must already have code in your program to do something in the above cases. So simply add the System.out.println(..) statements in the same part of code.

  • Printing out to command window project

    hi all, i have a question on this cart program i am making, i wanted to know how to output the results to the command window every time a person clicks on the "current status" of their purchase. I want it to print out like ( 5 boxes purhcased, 4 cds bought, serial number is 1234...... ) i want it to do this until the person exits out of the program.
    i have pasted the code below thanks :)
    (copy and paste )
    import java.awt.Color;
    import java.awt.GridLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class TestProgram extends JFrame implements ActionListener{
    JLabel column1, column2;
    JLabel totalItems, totalCost;
    JLabel serialNum;
    JLabel electronics, autos, furnitures, cds;
    JButton TrackAssets, delete;
    JPanel panel;
    JTextField electronicsAsset, autosAsset, furnituresAsset, cdsAsset;
    JTextField serialNumber;
    JTextArea items, cost;
    public TestProgram()
         column1 = new JLabel("Select Items");
    column2 = new JLabel("Specify Quantity");
    electronics = new JLabel("Electronics");
    electronicsAsset = new JTextField();
    electronicsAsset.addActionListener(this);
    autos = new JLabel("Autos");
    autosAsset = new JTextField();
    autosAsset.addActionListener(this);
    furnitures = new JLabel("Furnitures");
    furnituresAsset = new JTextField();
    furnituresAsset.addActionListener(this);
    cds = new JLabel("Compact Discs");
    cdsAsset = new JTextField();
    cdsAsset.addActionListener(this);
    serialNum = new JLabel("Serial Number input here");
    serialNumber = new JTextField();
    electronicsAsset.setNextFocusableComponent(serialNumber);
    totalItems = new JLabel("Total Items:");
    totalCost = new JLabel("Total Cost:");
    items = new JTextArea();
    cost = new JTextArea();
    TrackAssets = new JButton("Current Status");
    TrackAssets.addActionListener(this);
    delete = new JButton("Delete all");
    delete.addActionListener(this);
    panel = new JPanel();
    panel.setLayout(new GridLayout(0,4));
    panel.setBackground(Color.white);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    if(tracker.electronics.length() > 0){
                   try{
                   electronicsNo = Integer.valueOf(tracker.electronics);
                   tracker.itotal += electronicsNo.intValue();
                   catch(java.lang.NumberFormatException e){
                   electronicsAsset.setText("Invalid Value");
                   else {
                        tracker.itotal += 0;
    if(tracker.autos.length() > 0){
    try{
    autosNo = Integer.valueOf(tracker.autos);
    tracker.itotal += autosNo.intValue();
    catch(java.lang.NumberFormatException e){
    autosAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.furnitures.length() > 0){
    try{
    furnituresNo = Integer.valueOf(tracker. furnitures);
    tracker.itotal += furnituresNo.intValue();
    }catch(java.lang.NumberFormatException e){
    furnituresAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.cds.length() > 0){
    try{
    cdsNo = Integer.valueOf(tracker.cds);
    tracker.itotal += cdsNo.intValue();
    catch(java.lang.NumberFormatException e){
    cdsAsset.setText("Invalid Value");
    else {
    tracker.itotal += 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    tracker.icost = (tracker.itotal * 300.00);
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    if(source == delete){
    serialNumber.setText("");
    electronicsAsset.setText("");
    autosAsset.setText("");
    furnituresAsset.setText("");
    cdsAsset.setText("");
    serialNumber.setText("");
    tracker.icost = 0;
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    tracker.itotal = 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    public static void main( String[] args )
    TestProgram frame = new TestProgram();
              frame.setTitle("Asset tracking program");
    WindowListener l = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);

    If you want to print out to the commmend line all you need to do if put in
    System.out.println(....whatever......);Add this line of code to whereever you click the button to display the users "current Status". In hte brackets is whre you put the details of what you want ot print out e.g. boxes purchaesd etc.
    Chris

  • Output plsql variable to command window

    I am executing a PLSQL stored procedure from my java class. I want to know how to output a variable within the PLSQL to the command window?
    thanks

    I don't understand the question. Are you telling us you don't understand how to use System.out.println(...);? How do you debug programs without using this method?
    Usually the first program someone learns to write is something like:
    public static void main(String[] args)
        System.out.println("Hello World");
    after they press "current status" or if they "delete" their current itemsYou want to do some activity when the above actions occur. You must already have code in your program to do something in the above cases. So simply add the System.out.println(..) statements in the same part of code.

  • Why it automatically recover current redo log in RMAN command window?

    Firstly, I restore controlfile and datafiles from a backupset.
    Then when I recover database in RMAN command window like below:
    RMAN> recover database;
    Starting recover at 15-AUG-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    starting media recovery
    archive log thread 1 sequence 9 is already on disk as file /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd0slz_.arc
    archive log thread 1 sequence 10 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90sd0tsb_.arc
    archive log thread 1 sequence 11 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90sd110b_.arc
    archive log thread 1 sequence 12 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90sd2ksr_.arc
    archive log thread 1 sequence 13 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90sd2mc6_.arc
    archive log thread 1 sequence 14 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90sd2qrm_.arc
    archive log thread 1 sequence 15 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90sd2s0w_.arc
    archive log thread 1 sequence 16 is already on disk as file /u01/app/oracle/oradata/lonion/redo03.log
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd0slz_.arc thread=1 sequence=9
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90sd0tsb_.arc thread=1 sequence=10
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90sd110b_.arc thread=1 sequence=11
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90sd2ksr_.arc thread=1 sequence=12
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90sd2mc6_.arc thread=1 sequence=13
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90sd2qrm_.arc thread=1 sequence=14
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90sd2s0w_.arc thread=1 sequence=15
    archive log filename=/u01/app/oracle/oradata/lonion/redo03.log thread=1 sequence=16
    media recovery complete, elapsed time: 00:00:04
    Finished recover at 15-AUG-13
    RMAN>
    But, when I recover database in SQL*Plus command window like below:
    [oracle@lonion ~]$ uniread sqlplus /nolog
    [uniread] Loaded history (2178 lines)
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 15 19:25:38 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL>
    SQL> recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile;
    ORA-00279: change 2147842454 generated at 08/15/2013 18:34:28 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_%u_.a
    rc
    ORA-00280: change 2147842454 for thread 1 is in sequence #9
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00279: change 2147842651 generated at 08/15/2013 18:40:25 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_%u_.
    arc
    ORA-00280: change 2147842651 for thread 1 is in sequence #10
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd
    0slz_.arc' no longer needed for this recovery
    ORA-00279: change 2147842653 generated at 08/15/2013 18:40:26 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_%u_.
    arc
    ORA-00280: change 2147842653 for thread 1 is in sequence #11
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90s
    d0tsb_.arc' no longer needed for this recovery
    ORA-00279: change 2147842656 generated at 08/15/2013 18:40:32 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_%u_.
    arc
    ORA-00280: change 2147842656 for thread 1 is in sequence #12
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90s
    d110b_.arc' no longer needed for this recovery
    ORA-00279: change 2147842684 generated at 08/15/2013 18:41:21 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_%u_.
    arc
    ORA-00280: change 2147842684 for thread 1 is in sequence #13
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90s
    d2ksr_.arc' no longer needed for this recovery
    ORA-00279: change 2147842686 generated at 08/15/2013 18:41:23 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_%u_.
    arc
    ORA-00280: change 2147842686 for thread 1 is in sequence #14
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90s
    d2mc6_.arc' no longer needed for this recovery
    ORA-00279: change 2147842689 generated at 08/15/2013 18:41:27 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_%u_.
    arc
    ORA-00280: change 2147842689 for thread 1 is in sequence #15
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90s
    d2qrm_.arc' no longer needed for this recovery
    ORA-00279: change 2147842691 generated at 08/15/2013 18:41:28 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_16_%u_.
    arc
    ORA-00280: change 2147842691 for thread 1 is in sequence #16
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90s
    g0or9_.arc' no longer needed for this recovery
    ORA-00279: change 2147842986 generated at 08/15/2013 19:14:29 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_.
    arc
    ORA-00280: change 2147842986 for thread 1 is in sequence #17
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_16_90s
    g0os5_.arc' no longer needed for this recovery
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    SQL> recover database using backup controlfile;
    ORA-00279: change 2147842986 generated at 08/15/2013 19:14:29 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_.
    arc
    ORA-00280: change 2147842986 for thread 1 is in sequence #17
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/oradata/lonion/redo01.log        ---- Yon see, proceeding this process, it can't automatically apply the current redo log.
    Log applied.
    Media recovery complete.
    SQL>
    Question Coming:
    Now, my question is that 「Why it automatically recover current redo log in RMAN command window but not in SQL*Plus」?
    BTW: Please pay attention to the red font.

    It also seems not work.
    SQL> recover automatic database using backup controlfile;
    ORA-00279: change 2148632889 generated at 09/26/2013 12:45:22 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_.
    arc
    ORA-00280: change 2148632889 for thread 1 is in sequence #48
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc' no longer needed for this recovery
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file
    or directory
    Additional information: 3
    SQL>
    It must specify the redo log.
    SQL> recover database using backup controlfile;
    ORA-00279: change 2148632889 generated at 09/26/2013 12:45:22 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_.
    arc
    ORA-00280: change 2148632889 for thread 1 is in sequence #48
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/oradata/lonion/redo02.log
    Log applied.
    Media recovery complete.
    SQL>

  • Command window in a frame

    Hello,
    Is it possible to have a command window, by command window I mean the black window you get when you type cmd in run in windows or a shell in Unix, Linux, in a JFrame. I have a two web apps that I want their outputs/logs to be displayed in such frame plus tomcats output window.
    regards,
    Ehsan

    user2135732 wrote:
    I thinks I have not explained the problem correctly, I have two web applications that produce outputs, I want to display these outputs together with the server( this is in C) and tomcat outputs in a JFrame, yes I will be using a JTextArea or come other area but the question is how to redirect the output. How can I redirect the output of tomcat to a JTextArea, how can I do it with a server that sends it output to the standard output, stdio.Configure the server not to write the output to stdout, but instead a file. Then you can display the contents of that file.

  • Requesting user input from UNIX command window

    New to this forum, and relatively new to Java......question for you......
    Currently, I am able to request a .txt file from a user in my unix command window by having them type in the following command:
    java Game (nameOfTextFile).txt
    with the following code:
    public class Game {
    public static void main(String[ ] args) {
    try{
    reader = args[0];
    catch(Exception g){
    System.out.println(g);
    where 'reader' holds the .txt file.
    What I would like to do is as soon as the user types in the command:
    java Game
    it gives them the line:
    "Please type the file to be input"
    and at this point they type in:
    (nameOfTextFile).txt
    and then I can start working with the text file.
    Any ideas?
    Thanks

    public class Game {
    public static void main(String[ ] args) {
    try{
    reader = args[0];
    catch(Exception g){
    System.out.println(g);
    }This class will not compile. The variable 'reader' is not declared anywhere.
    You could create a shell program. When the user enters the name of the shell program at the command prompt, it gives them the prompt to enter the file to be input. And then from within the shell program you call the java program with the name of the file.

  • Command line questions....

    I really have two questions here.
    First, I have a small server that is very similar to this one I pulled off a tutorial:
    public class MyServer{
    // A bare-bones example: exception handling omitted.
       public static void main( String args[] ){
          ServerSocket serv;
          serv = new ServerSocket( 5150 );
          while ( true ) {
             Socket s;
             s = serv.accept();          // Wait for a connection
             handle_connection( s );  // Got one, now do something!
            s.close();
    } When I run this program from the command line it goes into an infinite loop readily accepting connections.
    For the most part, this is what I want. But how do I gracefully exit the program? Simply closing the command window seems drastic, not to mention the list of exceptions it throws.
    Second question: Once I run my program, is there a way I can close the command line window and log off the computer without killing my program?
    thanks.
    (Running on NT)

    How do you stop the program? You write another program that connects to the same socket and sends a message that both programs agree means "Shutdown". When the server receives this message, it shuts down nicely.
    Now you want to run it as an NT service? I've seen people post links to a third-party package that can run a Java class as an NT service; I didn't note the link but you could probably find it by searching the forums.

  • Visual Studio 2013 and SSDT-BI Preview Command Window

    Hi,
    Is it normal that VS is putting up a command window when previewing SSRS reports from Visual Studio 2013. It pops  up when on preview and I have to minimize it. Can some settings make this window invisible (a more integrated approach)?
    Regards
    SWEDEV

    Hi SWEDEV,
    Based on my research, a command window pops up when we preview an SSRS report in Visual Studio 2013 is a confirmed issue.
    The issue is fixed, but the updated version within the coming couple of weeks. For more details about this issue, please refer to the following Connect Feedback 849709 and 884544:
    https://connect.microsoft.com/SQLServer/feedback/details/849709/reporting-services-preview-processing-host-issues
    https://connect.microsoft.com/SQLServer/feedback/details/884544/ssdt-bi-for-vs2013-preview-for-ssrs-pops-up-a-command-window
    If there are any other questions, please feel free to ask.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Too many DOS command windows

    Hello,
    When I start my local J2EE engine from inside the Management Console it launches a bunch of DOS command windows.
    Is there anyway to make those just go away after they have launched/started whatever process each of them handles?
    It's not a huge deal but it's annoying to see all those DOS windows on my Task Bar AND there is always the possibility that one of them will get closed by accident thereby "screwing up something".  It just seems kinda archaic to have all these DOS windows there the whole time I'm running my local engine.
    Thanks in advance for any help.
    David.

    Just cleaning up all my unanswered questions. Sorry that this will cause the post to 'bubble up' to top.
    When we upgraded to later versions of Netweaver Developer Workplace this was not an issue anymore.
    We're currently on 2004s sp09

  • Changing the title of the Command Window

    How do i change the title of the command window form "C:\Programs\jdk1.2.1\bin..." etc to something more useful like "MyProgram"?
    Many thanks
    Cath

    What I amproposing is that if we all merge on the same chapter and examples then we can ask each other specific questions and all have the same benchmarrk and reference points!!
    I plan to advertize this on other lists and if we all use the same text then we are all the much further ahead instead of having questions from all sorts of text and nobody knowing what the other is doing and having completely different code and examples!!
    What do yu guys think?
    Personally, I am in chapter 8 just staring SWING. But I don't mind going back to the first part to help othere newbies (as long as we have the same text and the examples are from the text).
    For example, I have modified example 8-1, so that instead of just showing colors in the background, the buttons show a photo with text, shows text and changes the background, and will do something else ( don't know what yet)! But the whole thing is still based on the example code on page 323.
    I had some problems trying to figure how to do this... but if we all work on projects that are based on the code examples for the same text, we stand a better chance of all learning faster...
    So Yes, it is a study group using emails or chats...forum.
    The main difference is that if a person needs help we can all share code with them (NOT NECESSARILY DOING THE PROJECT...unless you wan to) but with the same book {Core Java2-Fundamentals or Core Java2- Advanced Programming} and with the help of at least one senior programmer that we have on the thread already ... with the otheres like you that want to join...all using the same book....Then no matter what project you are working on (from the book or work or school) we all have the same text to help each other and to reger each other to.
    Moreover, there never need to be another instance where the answer comes back: "read the tutorial" or check the docuemtation.... Those are good answers if you know what you are lloking for...but sometimes a person may need an example in working code.... and the tutorials don't answer specific questions where a person may not quite understand.
    So,
    why not stop by the New Study group that is going?...you can find us in forum New To Java Technology
    under the thread of "is anyone learning Java using the Sun Microsystems book...."
    In the meantime.... the person that was asking for hel here has not posted anything ... So I wonder if she realy wanted help?
    I will hang out here fopr another day or so and see if she answers my questions to her .. If nt then i will assume that this is a dead thread and I will no longer be here. You know where you can find me....
    phil

  • Exception in command window

    Hi all,
    I wrote several programs using Eclipse IDE.In the projects I included bunch of jar files.When I try to run those programs under command window I get exceptions.I have figured out that those exceptions are caused by the missing jar files.So I need to set a classpath to define those jar files.
    I tried to set classpath in autoexec.bat file and when I try to run the autoexec.bat I saw that under CLASSPATH setting it says "Out of environment variable" That is I guess because the definition of classpath is too long.
    My question is:Is there a shortest way to define multiple jar files?
    Not like: SET CLASSPATH=C:\abc\a.jar;C:\abc\b.jar;...
    Is it possible to write like: ...=C:\abc\*.jar
    Some of my jar files are under same directory.
    It is going to be hard to write all classpaths like: java -classpath ... Prog
    Did anyone faced that kind of problem?I would really appreciate if anybody could help me.Thanks alot.
    EUB

    you can avoid long classpath by either including all the jar files under one roof, making fewer jar files. or run ur program with the -classpath option so that u can specify the classpath at run time. This option requires you to specify the classpath in addition to the one in autoexec.bat for all the programs which require those jars

  • How do you make a stand-alone app work without seeing a command window...

    I'm new to Java so please forgive the very basic question I'm asking. All the apps I've learned how to make so far cause a command window to appear along with the GUI. How do you keep the command window from showing up?

    java ExampleApp
    I just discovered using the search for this site. I should know better than to make a post without first using the forum's search. It's just that I had been searching the java tutorials already to no avail as well as using a search engine.
    According to the forum here, people have said that you need to create a .jar file. I'll need to look into the specifics. Sounds a bit confusing at first. There was also mention of starting the app like so:
    javaw ExampleApp
    I'll go try that now! Any other suggestions you may have will be appreciated!
    Thanks,
    Darren

  • Workflow 2.6.4.0.0 configuration problem - Command window does not close

    I am trying to install Oracle Workflow 2.6.4.0.0. as part of Warehouse builder using the details mentioned in this link
    http://www.oracle.com/technology/obe/10gr2_owb/owb10gr2_gs/owb/lesson4/etl-mappings.htm
    From the Start menu click Programs > Oracle <Database HOME> > Configuration and Migration Tools >
    Workflow Configuration Assistant. The Assistant is started.
    Accept the default for Install Option
    Workflow Account: (Accept the default ) owf_mgr
    Workflow Password: owf_mgr
    SYS Password : <Enter the SYS account password>
    TNS Connect Descriptor: localhost:1521:orcl
    Click Submit.
    However following this document, the command window did not close, and I did not get any message stating that Workflow Configuration has successfully completed.
    The command window displays this message as the final step and does not close-
    WorkflowCA: Executing :C:\oracle\product\10.2.0\db_1\jdk\bin\java -jar C:\oracle
    \product\10.2.0\db_1\oc4j\j2ee\home\admin.jar ormi://localhost:6041 admin welcome -application WFALSNRSVCApp -testDataSource -location jdbc/WorkflowDS -username OWF_MGR
    Is this installation complete? How to resolve this?
    Please can any one help?
    Thanks very much
    Allan

    I ran into this problem. And it took me while to get it fixed, but It does work.
    First the TNS Desc is misleading. One would think that it would be host:port:sid. What it is really looking for is host:port:servicename. But if you want to use the "Change Tablespace" drop down list you need to, enter the sys password, change it to host:port:sid - Then use the drop list. And change it back before you press submit.
    The second thing that I found is that it wants to use the SYSTEM tablespace as temporary tablespace. THis is becuase it is looking for a temp tablespace called TEMP. If you look a the line default_temp = SYSTEM. And if you dont supply a tablespace it wanted to change it in the wfsysgnt.sql script in the $OH\wf\sql directory. You would think that what ever the default database tbs and temp tbs is - that owf would use that. No, it wanted to change it. Oracle needs to fix this.
    So here is how i fixed it. I had to create a temporary tablespace called TEMP, does not need to be big as I dropped it after it was done. Then i had to modify the wfinstall.csh script and use the install options. Not the /tablespace this option is obayed but it will try to use the SYSTEM as the temp tbs. Here is my example that I appended:
    /wfacct "owf_mgr" /wfpasswd "my_owf_mgr_pwd" /debug "true" /tnsConnDesc "my_host_ip:my_port:my_servicename" /syspasswd "change_on_install" /tablespace "OWF_TBS"

  • How to get rid of the command window....

    How to get rid of the command window, automatically, once the .bat file which execute the .jar has been executed?
    Znx

    If you don't want the command window to show, use:
    javaw yourClass
    instead of...
    java yourClass

Maybe you are looking for

  • Missing tab in ME29N screen

    hi, i have created below thread in SAP NetWeaver Administrator, but no response, thought i posted it to wrong category. https://forums.sdn.sap.com/click.jspa?searchID=15443307&messageID=6020795 i re-post the same question here, hope there is someone

  • Accordion scroll bar missing in IE6

    As soon as I specify a width for an accordion- .Accordion { width:275px;} -, the vertical scroll bars disappear. Why is that and what can be done about it?

  • Restrict business partner during selection help

    Do you know how to restrict BP to organization / team when using selection help in transaction CRMD_ORDER? For example, for support team, I only need partner with category organization,not person.

  • BAdi FMBW_CUSTOMER for Screen 2010 with customer subscreen does not update?

    Greetings, Trying to implement this BAdi (FMBW_CUSTOMER) but it doesn't update the FMBH customer defined fields. It seems to do OK in the PBO - meaning it gets the correct data from the dB table. It seems to recognize the PAI custom fields - it comes

  • I feel like my bottom is sore

    First you de-value our "Prized" Apple iPhones by $200, then you delete our post. Wah!!!!!! I just want apple to make it right. I've been a faithful customer since 1985 and have no problem joining the WINDOW FOOLS. I have been made a fool of for the L