Is it possible to redirect System.out and System.in for a thread

I would like to run two threads. One should keep writing to System.out and System.in. The other thread output written to System.out and System.in shoudl be captured and written to a file. Is this possible? I don't think so, but perhaps someone know some workaround.
rasped

hmmm sure it's possible. You can write an outputstream that does different things depending on which thread is running, and then set system.out to a printstream that writes to that outputstream.

Similar Messages

  • Is it possible to purchase creative cloud and try it for only one (1) month? My free trial expired without using it.

    Is it possible to purchase creative cloud and try it for only one (1) month? My free trial expired without using it.

    The price is higher, I think $70.  But you can purchase without the annual commitment.

  • Possible problems with Check out and Open Component and delayed publishing

    Hi,
    I've experienced some seemingly wrong behaviors of the checkout and open component and also with the delayed publishing feature, I've listed it down :
    1) The all important one:
    We know we've delayed publishing features for content, if we set the Release Date metadata at a future date, the content will not be released immediately, but do we have a delayed publishing features for a website page. Through manage website the user can add / delete a page(section), may do include or exclude from navigation etc.. but can they set a future date when a particular page can be included in or excluded from navigation? This should be a standard feature for a WCM solution and I hope there is some solution for sure.
    2) Can we set a datefield with a calendar feature as a page custom (section) property?
    3) Again the issue with checkout and open component, only the user with admin privilege seems to be able to change the content, normal contributors cannot, cause every time is tries to check in with the old author name, so the user has to have admin privilege to assign a different doc author's name. No trace also who is making the changes.
    4) Also facing a lot of problems while trying to implement when we use this checkout and open component. As we cannot check who is making the change there is to way to set us a step for self review, also user can only approve or reject but cannot edit the doc before passing it to the next step, if the step user is created using tokens then only checking out of the doc takes it pass the step user, but everything is working perfect with contributor data file. No problem whatsoever. Even if we use manual check out and then check in (i mean without using checkout and open component) this is working fine. But the main problem with non-technical users will be they would not like the content server portal at all and they would always prefer ms word over anything else. They would directly like to double-click on the website page, the word doc will pop up and they would make change and save.
    Issue 1 and 4 are killer issues for us, I need your help to find a solution. I have few more issues that i will post later.
    Regards,
    Nirmalya
    vijayr: Are u Vijay Ramanathan? Product Manager, Oracle UCM, u r my mentor sir.

    Hey Shotdawq,
    I was a bit low on bandwidth, so could not visit the forum any sooner.DIS is dynamic integration studio, it works on the webdav protocol.
    you will need to install DIS on the client machines. The POC that i did was integration of SiteStudio with CheckOutAndOpenInNative.
    I am also planning to referenc this functionality from WebSphere, what i have in my mind is to copy the java script from my sitestudio page and paste
    it in the JSP, and then using the CIS or RIDC will execute the serverices. At present i am stuck in some other work, If i get this thing working i will
    update you. In the meanwhile if you have some question for me, feel free to throw them.
    cheers,
    sapan

  • [Athlon64] TV-out and SPDIF brackets for RS482M - where to get them?

    Hi folks!
    I'm building a HTPC and the MSI RS482M motherboard looks like a perfect candidate for me!
    However, I'm having problems locating a supplier for the TV-out and SPDIF brackets.
    I've asked the retailer if they're a part of the mainboard package, and it turns out they're not.
    Any idea where I could get one?
    I live in Ireland, but any online store that ships here will do.
    Thanks!

    Quote from: tr6c on 02-March-06, 12:20:02
    Has anyone found a bracket or successfully made one?
    -TR6C
    My RS482M4-ILD came with seperate brackets for the video outputs, the extra audio connectors, and bracket with a single spdif port.

  • HELP! my mac has logged me out and now asking for a name and password?

    I was logged on shopping on top-shop online and suddenly the mac shut down.
    It seems it has reset its self! My icon has disappeared and its now asking  for a name and password.
    i have tried my log in but it is not working.
    Is there another way to reset the password?
    can i reset it to log back in what can i do?
    I have rebooted the computer several times but i dont know what to do!

    First, make sure caps lock is not on.
    Another reason why your password might not be recognized is that the keyboard layout (input source) has been switched without your realizing it. At the login screen, you can cycle through the available layouts by pressing the key combination   command-space or command-option-space. See this support article.
    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password.
    Otherwise*, start up in Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. In the window that opens, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens. Close the Terminal window to get it out of the way.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
     ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but your Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it.
    *Note: If you've activated FileVault, this procedure doesn't apply. Follow instead these instructions.

  • How to enable multiple check-out and check-in for offline editing (sharepoint 2010)

    I have  a SharePoint site where I am using check-in check out feature for one of 'Project' document library.
    By default SharePoint supports single document to be checkout for offline editing (when i click on checkout, SP ask for 'Use local draft option' for offline editing), if I select that check box, it take a local copy for offline editing in my 'SharePoint
    Draft' folder.
    but when I try to check-out multiple files from 'Project' document library, it does not show any form for confirmation, as shown above (use 'Local draft option') and files get checked out on server it self, but I didn't find any local copy in  'SharePoint
    Draft' folder. mean sharepoint does not support multiple file check-out feature for offline editing.
    Please suggest if we can check out multiple files for offline editing in sharepoint 2010.
    Thanks

    Sagar, Thanks for reply, but none of the link is useful.
    These all links talk about the check-in check-out feature, but my issue is that, when I do select multiple files for checkout Draft’s dialog
    box does not appear and offline copy of files is does not created. how to fix that issue.

  • Itunes: is it possible to play midi files and cdg fomat for karaoke lyrics.. thanks!

    aussi, existe-t-il un raccourci clavier pour sélectionner une chanson pour l'envoyer dans la suite de ITUNES DJ?

    Hi Fishee112368,
    The iPhone can play videos from websites. Try playing a few trailers from http://www.apple.com/trailers/
    +Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats+
    http://www.apple.com/iphone/specs.html
    Jason

  • Since i upgraded to os4.33 on saturday, the wifi connection on my 3gs keeps dropping out and prompting me for the password for the router. any ideas why this is happening

    WIFI intermittent problem.
    3gs doesnt recognise the password and keeps losing conection to wifi,
    never had this problem before
    any ideas?

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I have an iphone 5, and got it 3 weeks ago. I turned my phone off earlier and its now asking to enter my 'Pin' for my sim and i have NEVER activated a pincode for this sim? i am now currently locked out and have been for the last 2 hours... someone help!!

       l

    Is it specifically asking for a pincode for the SIM? If so you will need to contact your cell carrier.

  • Exceptions .. redirecting System.err

    I've redirected System.err to a custom class that extends OutputStream.
    I have a couple of questions which someone in here might know the answer to:
    1. When I receive an exception write(byte b[], int off, int len) is called. The array of bytes is always 8192 long - padded with \x0000 at the end. Why?
    2. How do I know an exception has ended? I want to notify the user when it has ended (with a popup). But write() is called for each line, and flush() doesn't seem to be called at all.
    Best regards,
    Bjorn

    Depends what kind of a program you are writing. If you are doing a standalone application, you can always have a master try-catch block in the main() method that will catch Throwable. Nothing should make it past that.
    Now, if you are doing a servlet or EJB, you don't want to trap every exception because the container is supposed to receive and handle them for you (thread death, out of memory, etc.) If you have a front-controller pattern implemented, you can put a master try-catch block there and do something like the following:
    try {
    // implement cool functionality here
    catch (RuntimeException e) {
    // use code to retrieve stack trace
    throw e;
    catch (Exception e) {
    // use code to retrieve stack trace
    // handle exception in application-specific manner
    catch (Error e) {
    // use code to retrieve stack trace
    throw e;
    The cool "feature" about exceptions is that they propogate. So, if you don't have the appropriate catch block, it will move to the previous caller. Hence, you can have a master exception processor if either a) you re-throw exceptions on to be procsesed by the master exception processor or b) you don't handle the exception at all and let it propogate naturally.
    You also have a number of options so you don't have to rewrite 300 exception try-catch blocks. Subclass Exception, and for all your custom exceptions, put the functionality to dump or store the stack trace there. It will happen anytime your custom exception is instantiated.
    Lots of ways to skin a digital cat. However, the argument that you will have to change code to get new functionality is part and parcel of the beast. If you want to capture the stack trace and do something with it, code somewhere will have to change. Either use inheritance, delegation or the exception propogation mechanism inherent to Java to minimize your work.
    - Saish
    "My karma ran over your dogma." - Anon

  • Skype starts and automatically signs out and shuts...

    Having the same problem here.
    2 days ago skype was working fine.
    now everytime i start it up and sign in it automaticly signs out and shuts down for no apparant reason.
    any idea's ?
    This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content. A link to this post appears where the post was originally added.

    http://heartbeat.skype.com/2014/09/i_keep_getting_signed_out.html
    Open your Skype account settings page:
    https://secure.skype.com/portal/account/settings
    If your Skype account is linked with Microsoft account, then try to unlink them.
    https://support.skype.com/en/faq/FA12211/how-do-i-unlink-my-skype-and-microsoft-or-facebook-accounts

  • Toshiba 32 XV505 optical out and sound bar

    Hi guys, wonder if you can help.
    I have a toshiba XV505 TV and I've just bought a Cambridge Audio TV minx sound bar, it works fine with a headphone cable from the TV but for best quality sound I wanted to use an optical out cable. But when plugging in the optical cable I get nothing, I've tried the optical cable with the DVD player and it works fine so the cable is good. Is this some type of restriction with the TV that it can't output the sound?
    I can't find a setting in the menu where I'd need to enable it. Can anybody help?

    The optical out option is not displayed.
    nothing to do with Midi Setup, the issue is Hardware level, when hdmi is plugged there is no way to get out signal from optical out. (no red light). Even with hdmi to dvi converter.
    I just bought a none official MDP to DVI adapter, hoping it works.... just paid about 8$. But I think it's a shame to make users find own solutions and spend even more money, after spendig 1000€ in a Mac mini.......
    That's not the way to do things, they made a big mistake with that, no way to get optical sound, im going to try this last trick, but even if it works im totally disappointed with apple. After more than two months Late 2012 mini come out, and no solution for this.... just an update we need!!

  • Rule based monitors (RZ20) - Show system availability for selected systems

    Hi experts,
    I'm new with CCMS monitoring and need an advice for rule based monitors.
    I want to create three alert monitors (RZ20). One for our developing systems, one for our quality assurance systems and one to monitor our production systems.
    For the start, I want to show data in each of this monitor for free space of the filesytems (MTE class: "FilesystemFreeSpace"), for users which are locked out (MTE class "R3SyslogSecurity") and for the availabilty of the ABAP systems (MTE class "Availability_SysPercent_ABAP").
    I started to create the monitor for our developing system and got a problem. I started with the rule "CCMS_DEFINE_R3_SYSTEMS" to select our developing systems "HRT", "CRT" and so on. Under this nodes, I defined the mte classes ("CCMS_GET_MTE_BY_CLASS") which needs to be shown: "FilesystemFreeSpace", "R3SyslogSecurity" and "Availability_SysPercent_ABAP".
    When I checked the results, I was able to see the free space of the filesystems and whether a user has been locked out. Unfortunately, I recognized that the availability is not shown. Instead there is the message "No MTEs currently available".
    I'm aware, the availability cannot be shown on this way, since the agents are part of the central monitoring system and hence i need to choose the central system for "CCMS_DEFINE_R3_SYSTEMS". However I'd like to show the availability separated for each system under "HRT", "CRT" and so on. That means for example, there should me a node "HRT", which contains the free space of the filesystems, whether users are locked out, and the availability for the system.
    It's not a problem to get a solution with a static monitor. I simply create a virtual node "HRT" and tick the checkbox under "<central system>, ..., <availability>, <hrt> ..."
    However, I'd like to use rule based monitor to keep the effort at a minimum by not ticking thousand of check-boxes when I expand the monitored objects.
    I also tried to use the rule "CCMS_GET_AVAILABILITY_FOR_SYSTEM", but it doesn't work and SAP documentations say "This rule is reserved by SAP for later use".
    Does anybody know a solution for my problem?
    In addition, I've got one more question concerning rule based monitors: If I want to create a monitor for my developing systems, I'll not be able to choose "<all>" for "CCMS_DEFINE_R3_SYSTEMS". Do I need to create "CCMS_DEFINE_R3_SYSTEMS" for each system separately? Or is there another possible way?
    Thanks for your help in advance.
    Bob
    Edited by: Bob Norwich on Oct 17, 2010 12:04 PM
    I read something about logical MTE classes: http://help.sap.com/saphelp_nw04s/helpdata/en/31/5462405c910272e10000000a155106/frameset.htm --> Does I need to use this?

    Sorry Sean for my very late anwser.
    I was very busy in my company.
    Yes, I had tried you suggestion but it didn't work for me.
    The problem is, that the Agent "CCMSPING" is part of the central monitoring system by definition.
    Furthermore I tried to copy the default availabiliy monitor to look how it is definied. It didn't help.
    I made the decision to define my monitor differently (an extra monitor for the availability for all system) and replace this temporalily solution when ""CCMS_GET_AVAILABILITY_FOR_SYSTEM" will be available.
    The situation is not so bad after all.
    Thx for your help. I appreciate it!!
    Bob

  • Question about voice and data plan for Europe

    I am in New York and my boss is going to France for a week and a half. He told me he will not have access to the internet there. He asked me to find out if it would be possible to get a voice and data plan for the month that he will be there, and if so, could someone show me where I could look at the different plans available?
    If it's not possible to do that for just a month, then could someone tell me where I could find the rates are for voice and data in France?
    Thanks

    Hi kevindrosario,
    I appreciate your interest in our International Services.  France, is a GSM country and will only support a Global capable device. Unfortunately, its not clear if your boss has a Global capable device.  If so, here are the details for the voice and data rates for France.
    If your boss doesn't not have a Global capable device, no worries!  We offer an Occasional Global Traveler program, in which we will loan you a Global device for up to 21 days.  I hope this information is helpful.  Please let me know if you have any any additional questions or concerns.
    Thank you,

  • The best H.W and O.S for Java

    Hi
    I am developing a network monitoring program with too many threads and hundreds of GUI components, I am using my personal PC (windows vista, dualcore cpu 2.2, , 2 GHz RAM, netbeans 6.8)
    I know I am using a humble PC but I want to get more advanced/professional H.W and O.S , so my question now is :
    what to you use for java (H.W and O.S) as professional and semi-professional solutions? (and if possible the range of prices)
    and any suggestions for me to increase the performance of my PC with Java (i think Linux will speed it up but I am not sure which distribution)
    Note:
    Best Regards.
    Anderson.

    If you're going to pick Linux, and want to run Sun's/Oracle's Java... Then I'd suggest a distro that is officially supported per:
    http://java.sun.com/javase/6/webnotes/install/system-configurations.html
    Otherwise pick Solaris (X86/Sparc).

Maybe you are looking for