How to enable System /in/out/err by default in the bsh.Console ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to enable System /in/out/err by default in the bsh.Console ?

rameshj
Hi,

By default the bsh.Console does not capture System out /err /in. It can
be enable by selecting menu "Capture System in/out/err". How can I
enable it by default ? Advance thanks for your help.

Regards,
Ramesh

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users
Reply | Threaded
Open this post in threaded view
|

Re: How to enable System /in/out/err by default in the bsh.Console ?

rameshj
Hi,

FYI. I can enable capture System out/err/in by adding the following code in the getBshPrompt.bsh.

private static boolean firstTime=true;
getBshPrompt()
{
        if( firstTime )
        {
                firstTime=false;
                if( bsh.console != void )
                {
                        System.setIn( bsh.console.getInputStream() );
                        System.setOut( bsh.console.getOut() );
                        System.setErr( bsh.console.getErr() );
                }
        }
        return "EMH CM CLI > ";
}

Thanks,
Ramesh

J Ramesh Kumar wrote:
Hi,

By default the bsh.Console does not capture System out /err /in. It can 
be enable by selecting menu "Capture System in/out/err". How can I 
enable it by default ? Advance thanks for your help.

Regards,
Ramesh

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users

  


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users