Jre 1.5 waitfor hangs windows xp if output more than 17 lines

I have seen many postings on the "waitfor" part of an external process. I am too having issues with it. For some reason when there is more than 17 lines of output, "waitfor" hangs. I am executing a simple external command to prove the point. I run the command c:\rundir.bat. All this program does is an "echo hello" multiple times (I alter the number of times to find the threshold).
Any ideas?
Code snipit:
Command is an array of 3
cmd[0] = "c:\windows\system32\cmd.exe"
cmd[1] = "/C"
cmd[2] = "c:\rundir.bat"
p = Runtime.getRuntime().exec(cmd);
rc = p.waitFor(); // Hangs forever if more than 17 lines of output.
if (rc != 0) {
success = false;
br = new BufferedReader(new InputStreamReader(p.getErrorStream()));
else {
success = true;
br = new BufferedReader(new InputStreamReader(p.getInputStream()));
}

1) Search these forums. This problem has been asked over and over again.
2) Read the entire System.exec() and java.lang.Process javadoc. The situation you need to prevent is well-documented.
Briefly put: the error and output streams of the external process must be timely read; failure to do so when executing a process which writes to either or both of these streams can cause deadlock, since writing to a stream may block and the operating system provides limited buffer space for these streams. You will need to use multiple threads.

Similar Messages

  • Problem with closing other firefox windows when window in use has more than 1 tab open

    If I have multiple firefox windows open, and the one that I am using has more than one tab open, when I try to close one of the windows that I am not using by hovering over the firefox icon on the taskbar, then clicking the cross on the other windows, a message appears asking me if I want to close a window with more than one tab open. This means that firefox is trying to close the window that I'm using, not the one I'm trying to close. Please note this only happens when I hover over the icon on the taskbar then click the cross for the window I want to close. If I open the window properly, then click the cross on the window itself, it works fine.
    Just wanted to know if anyone else has this problem, and if they do, then mozilla should probably fix it in their next update, it's getting really annoying now

    I can't find a bug on file for this on https://bugzilla.mozilla.org/ (although there are many taskbar-related issues under review).
    (1) Just to confirm, do you both have "Show tab previews in the Windows taskbar" turned off here:
    orange Firefox button (or Tools menu) > Options > Tabs
    (2) Have you tried disabling Firefox use of hardware graphics acceleration?
    You usually need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    orange Firefox button (or Tools menu) > Options > Advanced
    On the "General" mini-tab, uncheck the box for "Use hardware acceleration when available"
    If you restart Firefox, do you notice any changes?

  • Windows Phone Hub with more than 2 sections causes ArgumentException when collapsing any section

    Hi there,
    I'm working on a Universal app which is using a Hub control to display different sections.
    On startup, I want to hide some of the sections. Using a button, I want to toggle between the visible sections using a binding property on the Visibility property (Handled in the ViewModel). In my ViewModel I have 2 boolean properties that are bound to the
    corresponding sections and are converted to Visibility using a BooleanToVisibilityConverter
    <Hub>
    <HubSection>
    <DataTemplate>
    <Button Content="Test" Command="{Binding SwitchVisibilityCommand}"/>
    </DataTemplate>
    </HubSection>
    <HubSection x:Name="First" Header="Test1A" Visibility="{Binding ElementName=pageRoot,
    Path=DataContext.FirstVisibleProperty, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter} }"/>
    <HubSection x:Name="Second" Header="Test1B" Visibility="{Binding ElementName=pageRoot,
    Path=DataContext.SecondVisibleProperty, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter} }"/>
    <HubSection x:Name="Third" Header="Test2A" Visibility="{Binding ElementName=pageRoot,
    Path=DataContext.ThirdVisibleProperty, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter} }"/>
    <HubSection x:Name="Fourth" Header="Test2B" Visibility="{Binding ElementName=pageRoot,
    Path=DataContext.FourthVisibleProperty, Converter={StaticResource ResourceKey=BooleanToVisibilityConverter} }"/>
    </Hub>
    public class MainPageViewModel : ViewModel, IMainPageViewModel
    private bool firstVisibleProperty;
    private bool secondVisibleProperty;
    public MainPageViewModel()
    FirstVisibleProperty = true;
    SecondVisibleProperty = false;
    SwitchVisibilityCommand = new DelegateCommand(ExecuteCommand);
    private void ExecuteCommand()
    FirstVisibleProperty = !FirstVisibleProperty;
    SecondVisibleProperty = !SecondVisibleProperty;
    public bool FirstVisibleProperty
    get { return firstVisibleProperty; }
    set
    firstVisibleProperty = value;
    OnPropertyChanged(() => FirstVisibleProperty);
    public bool SecondVisibleProperty
    get { return secondVisibleProperty; }
    set
    secondVisibleProperty = value;
    OnPropertyChanged(() => SecondVisibleProperty);
    public DelegateCommand SwitchVisibilityCommand { get; set; }
    This setup is working fine on Windows, but in Windows Phone I get an unhandled exception (ArgumentException with the message ´Value does not fall within the expected range.´). 
    When I reduce the amount of hubsections to two, one that is visible and one that is collapsed, everything is working fine again. When I use multiple sections that all use the the same visibility property no exception is thrown
    When I set both properties to true in the viewmodel, also no exception is thrown.
    I've also tried the following (Without succes):
    - change my boolean properties to Visibility properties
    - use different boolean properties for each of the sections
    I do not understand why this exception is thrown and the exception itself is to vague to give any useful information
    How can I resolve this error??

    I've uploaded my code to OneDrive. Use the following link to download the source:
    https://onedrive.live.com/?cid=9c0070abc26b0b55&id=9C0070ABC26B0B55%2173811

  • Windows 7 taking up more than 20GB

    I recently bought the new 15 in. Retina MacBook Pro with ~500GB of HDD and 16GB of RAM.
    I used Boot Camp to create a 51GB (it wouldnt let me choose 50GB for some strange reason) partition for Windows 7.
    I downloaded the support drivers, created the iso file, and ect. and then installed Windows 7 64 bit.
    When I finished with the installation of the support drivers that Boot Camp tells you too install, I checked my available space in My Computer and it says out of the 47GB of space on the partition I only have about 8GB of space left.
    So where did my 39GB of space go?
    So far I've been told AND also read on the box for Windows 7 that 20GB of memory is required for the 64bit.
    I tried deleting temporary files and cleaned up my disk as well as deleting my restore points, and that freed up only about 1GB of space.
    So anyone care to explain whats happening? Any feedback is much appreciated.

    Agree entirely and couldn't fault starting at 100Gb.
    You can expand the Windows partition using Winclone or CampTune.
    https://www.twocanoes.com/winclone.php
    http://www.paragon-software.com/home/camptune/

  • Windows 2008 not allocating more than 8GB of memory to all processes

    Hi,
    We have a web server with windows 2008 R2 on Amazon-EC2. Recently we have upgraded our server from one instance type to a higher one. New one has around 68GB of memory. How ever overall allocation of memory is not going above 8GB.
    When I looked at w3wp in process explorer, I have observed "\KernelObjects\MaximumCommitCondition" and "KernelObjects\LowMemoryCondition" kernel events. I could not understand the reason for "low memory" events in spite
    of the 60GB of available memory. 
    At any point of time %committedBytesInUse counter is showing only 5%.
    Can someone help me in making me understand on what is going wrong here?
    -Sudhakar
    Sudhakar

    was VM? was the VM configured with dynamic memory?
    Best,
    Howtodo

  • SQL query execution in DB02 hangs if record set is more than 50000

    Hi,
    We are facing issue in a report performance. The return is using native SQL query.
    There are custom views created ar database level for pricing/maetrial and stock. The native sql query is written on these views. The report takes around 15 mins to run in background .
    We are trying to analyse the native SQL query through DB02. I tried fetching records for one particular
    custom view to make out if its indexing issue or something else.When i using TOP 35000 records with select query runs fine with this dataset or less than this . If i increase it to 40000 system doesn;t show anything in SQL ouptut. And above one lakh records system gives timeout.
    The count in this view gives some 10 lakh records which I don't feel is v.v.huge that query that too native sql takes so much time.
    Any help on this will be highly appreciated.
    Regards
    Madhu

    what do you expect from that poor information.
    do you change data or onyl select.
    If you use SAP and ABAP, then you should also use Open SQL.
    Otherwise it is possible to run the SQL Trace with Native SQL, it is anyway only Native SQL, what the trace sees.
    Use package size and it will probably work fine.
    Siegfried

  • Web Browser Session Hangs When Opening More Than One Query

    Let me start off with the BW environment - we are on BW release 3.50 at support pack level 12. Basis component is release 6.40 at level 12.
    We have a situation where a web browser HTTP session "hangs" while trying to execute more than one query at a time. A role based menu template is used by our end-users to run queries. The end-users execute a query and while it is running, try to execute a second query. But the web browser for the second query does not become available until the first query is complete.
    The following is the detailed steps of the process:
    1. From my user menu in BW, expand the folder for Role Z: BW_REPORTING and click on SAP_BW_TEMPLATE – Web_Role_Menu. Web browser window will open.
    2. Within the ZTPL_Role_Menu_Reporting web page, select Role Z: FUNC_DEVELOPER > BW Reporting > Controlling > Profitability Analysis > Detail query. (Role Z: FUNC_TESTER can be used in this example as well, just follow the same menu path).  Click on Detail and another web browser window will open for the query selection screen.
    3. On the selection screen for the CO-PA Detail query, enter values and execute the query.
    4. While the CO-PA Detail query is executing, go back to the first opened web browser for ZTPL_Role_Menu_Reporting and go to Role Z: FUNC_DEVELOPER > BW Reporting > Controlling > Profitability Analysis > Operating Concern query. Run the CO-PA Operating Concern query while the CO-PA Detail query is still executing. The session for the Operating Concern “hangs” and does not display the selection screen until the CO-PA Detail query has completed. Once the Detail query has finished, then the second query, CO-PA Operating Concern will then display the selection screen for the query.
    Our end-users expect the second query to display the selection screen immediately with no delay. The end-users do not want to wait for the selection screen of the second query. They want to be able to execute the queries simultaneously.
    Our Basis group as tried adjusting some parameters and has implemented OSS note 853396, but the issue still exists.
    Is it a BW issue or is it an issue with MS Internet Explorer?
    Your input and suggestions are appreciated.
    Thanks.

    Hi.
    I had a somewhat similar issue earlier when I tried closing BW Query windows, it would freeze and wouldn't close. I resolved the issue by turning off some BHO (Browser help Objects) in IE.It can be done using IE>Tools>Manage Add-Ons
    Cheers
    Anand

  • JRE 1.4.1 causes windows 98 to hang

    I just installed the latest JRE 1.4.1, now every time I use the one Java program I have my computer hangs. Sometimes I can open it and then close before the hang - then I get a ddhelp.exe is not responding error message. Tried uninstalling and reinstalling all sorts of things without success. Only solution that works is to reduce the graphics hardware acceleration to the "basic" setting, but then other software I have that has heavy graphics requirements does not work.
    Any idea what is wrong?
    I run windows 98SE, Radeon7500 graphics card, AMD1700 processor. May also have a related problem - the windows update site keeps telling me to install a Java VM update dated March 4 that has already been installed so maybe something is not registered properly but then I have reinstalled most things luding this update) without success.

    JRE 1.4.2_07 crashed Windows XP-SP2, with a graphics device driver operating ATI Radeon 9800 XT (Driver Name: ati2dvag.dll).
    Further tech details below this message.
    The Sun Java web sites suggested the next java version upgrade to fix the crash problem.
    This forum provided the solution that is very applicable to the latest Windows XP, SP2 as with the Windows 98 SE problem: Conflict with DirectX. The JRE1.5 Contol Panel was a "ghost screen" until I the following process worked to display the window contents:
    "After spending the last few hours trawling through forums and newsgroups I noticed a lot of debate about how a certain Windows graphics software called DirectX may be <in conflict> with the JDK/JRE."
    1. Click Start, and then click Run.
    2. Type dxdiag, and then click OK
    (Microsoft Article ID : 157730
    Last Review : September 29, 2004
    Revision : 5.1 )
    (or try- Open the Windows help and type in DirectX.)
    ( Click on 'troubleshooting DirectX'.)
    (Click on 'Open the DirectX Diagnostic Tool'.)
    Once this tool opens click on the Display tab
    and then disable 'DirectDraw Acceleration'
    and 'Direct3D Acceleration'.
    Now to resolve the "noinit" applet errors.
    Thank you Forum participants!!
    Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2
    System Manufacturer: Dell Computer Corporation
    System Model: Dimension 8300
    BIOS: Phoenix ROM BIOS PLUS Version 1.10 A07
    Processor: Intel(R) Pentium(R) 4 CPU 3.20GHz (2 CPUs)
    Display: 256MB DDR ATI Radeon 9800 XT
    Memory: 1022MB RAM
    Page File: 326MB used, 2137MB available
    DirectX Version: DirectX 9.0c (4.09.0000.0904)
    DxDiag Version: 5.03.2600.2180 32bit Unicode
    ++++++End input.+++++++++++++++++++++++++

  • Jre 6u26 installation troubles on Windows 7 64 bit

    I've noticed that in my system was installed jre till update 24 and nothing earlier. So I tried to install new version of jre (6u26) but installation process ends immediatlu after UAC prompt, without any error message. I unistalled every kind of jre I found in my Windows installation but nothing changed. Taking a look to the event monitor, i've found that for every jre installation attempt is registered an Application Error, event ID 1000. Complete text follow:
    Nome dell'applicazione che ha generato l'errore: jre-6u26-windows-i586-s.exe, versione: 6.0.260.3, timestamp: 0x4dc16f4a
    Nome del modulo che ha generato l'errore: unknown, versione: 0.0.0.0, timestamp: 0x00000000
    Codice eccezione: 0xc0000005
    Offset errore 0x04ce7658
    ID processo che ha generato l'errore: 0xe6c
    Ora di avvio dell'applicazione che ha generato l'errore: 0x01cc52ab9124b4df
    Percorso dell'applicazione che ha generato l'errore: C:\jre-6u26-windows-i586-s.exe
    Percorso del modulo che ha generato l'errore: unknown
    ID segnalazione: d26812e9-be9e-11e0-a1cc-00195b0e11fa
    Now my system has no java runtime environment at all, and I don't know how to fix this problem. I also tryed disabling every tsr and service running at startup, but still I'm not able to complete the jre installation.
    What can I do?
    Pietro

    I opened a dos shell with adminstrator rights, typed command you suggested but nothing happened. Neither log file is generated at all, even I i choose a different drive (D: instead C:). In the Event Monitor, under Application section, there is an Application Error Id event 1000 for each installation attempt.

  • Hang Form Builder 10.1.2.3 for fmb files more than 2MB at Windows VISTA& 7

    Hi
    When i open fmb files more than 2MB with Form Builder (10.1.2.3) at Windows 7 form builder Hange and Close.
    Please help me if have any configuration or patch for forms builder.
    Regards
    Adel

    hi
    i think thats the VGA card problem check for compitible Driver.
    sarah

  • WaitFor() hangs if output from child process is bigger than few lines.

    I'm using j2sdk1.4.1_01.
    it seems like the bug which was reported many times, but supposed to be fixed in current version.
    any ideas, sugesstions?
    is there any way to change the size of the buffer?

    Coincidence? It should be 4096, actually - the size of the I/O buffer.
    Runtime.exec() gives you a handle to a process. You have to spawn a couple of threads to read the standard output and standard error of the process, or the process will hang after filling the output pipe, which is usually 4K.

  • End of life for JRE 1.3.1 for windows?

    Hi,
    Is it true that Sun has scheduled end of life for JRE 1.3.1?
    Best regards

    I am sorry I forgot to write the time,
    It says sometime in Aug, 05 (more than a year)

  • Issue in FF v 3.6.10: I have a page which have more than 20 link, clicking on these link opens up a popup using window.showModalDialog, for the first 20 popup opens up without any prob but for the 21st n more click it block the popup and do not open.

    Issue in FF v 3.6.10: I have a web page which have more than 20 link, clicking on each of these link opens up a pop-up using window.showModalDialog, for the first consecutive 20 popup opens up without any prob but for the 21st n more click it block the popup and do not open. This is m problem, the real user on the web page can click on more than 20 link in such a scenario it may create problem, please help

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • Firefox will not open more than one window and upon restarting will not open the previous tab and refuses to open bookmarks

    Firefox does not open more than one window. I can open plenty of tabs, but not more than one window. Upon closing firefox and trying to restart the browser will not open and needs to be closed through windows task manager. Upon trying to re-open Firefox I receive the 'oops this is embarassing , firefox cannot re-open your tabs" message. When I click on "new session" the bookmarks do not load. It is becoming very frustrating as I am a student and often do lots of research on the web while using lots of open windows.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    See also "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

  • Opening more than 1 ECL Viewer window from EasyDMS

    I have found that I can open more than one EasyDMS window as long as I am in 2 different directories, much like normal Windows operates. But when I double click on an image, in the first EasyDMS window, the image will open the image but I am unable to open an ECL  Viewer window if I double click on an image from the second EasyDMS window. The request seems to hang until I close the ecl viewer from the first EasyDMS window.
    Is this a limitation of EasyDMS / ECL Viewer or do I have something not configured correctly?
    I am using the Z_EASYDMS_ECL_OPEN_DOCUMENT function module.

    We have seen reports about a Community Toolbar extension causing this issue with not being able to open a new tab.
    So if you have such a toolbar then start with disabling it.
    *Tools > Add-ons > Extensions
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • I moved my Adobe program files to my E:\ drive and now I can't install Extensions

    I'm using Adobe Master Suite CS5.5 on  Windows 7 64 bit, I moved the programs using a program called Application Mover (http://www.funduc.com/app_mover.htm) I'm trying to install a .zxp extension into Flash Professional but have not been able to do s

  • TS1363 ipod shuffle is hot and will not charge

    Has anyone heard of a battery issue with the 4g shuffle?   My shuffle will not respond and is "hot" to the touch.  It does not respond, cannot be seen by my computer or itunes.  I have had several ipods and never had an issue like this.  I have had t

  • Hierarchical query To find the relation between the tables

    Hi, In my database schema i have hundreds of tables and dont have data model to understand the relation between them. I heared that there will be heirarchical query which can be written by using meta tables, is this query will really help me to under

  • Function to send e-mail

    Hi guys, somebody could tell me which is the function to send e-mail  in abap program?... have  an example with this functions? Thanks in advance. regards. Marisol

  • Quick question about BB Curve

    I am currenty with Roger's and I am switching my data plan to a BB data plan, I am about to purchase a BB Curve from EBay but before I do I am wondering if I need to buy an "unlocked" BB so that it will work with my provider?