Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4062587

exec Processes failing with long output.

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description



      Name: mc57594 Date: 07/01/97


      Spawning a process with the exec method will fail if the
      output from the process is sufficiently long. I have used
      exec() to initiate javac, so i don't know if the problem lies
      in the Process class or javac.

      The process in the following code will hang if the output from
      javac, due to errors or warnings, is sufficiently long - about
      20 lines or so:

      (note: try blocks will have to inserted for this to compile)

      String s = "j:\\java\\bin\\javac test.java";
      Process comp = Runtime.getRuntime().exec( sb );
      input = comp.getInputStream();
      error = comp.getErrorStream();
      comp.waitFor();

      /**
       * Code will not get past here.
       */

      byte[] imess = new byte[input.available()];
      byte[] emess = new byte[error.available()];
      input.read(imess);
      error.read(emess);

      if (imess.length > 0) System.out.println(new String(imess));
      if (emess.length > 0) System.out.println(new String(emess));

      return comp.exitValue()==0;


      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              never Tom Rodriguez
              Reporter:
              mchamnessunw Mark Chamness (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: