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

Runtime.exec() does not work with more.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.1.1
    • core-libs
    • sparc
    • solaris_2.6

      (Solaris2.6 beta Refresh II, JDK1.1.1)
      Following routine does not work if cmd has 'more file'.
      If cmd has 'cat file', it works fine. It seems exec() or io problem.


      public static void system(String cmd)
      {
              try{
                      Process cp = Runtime.getRuntime().exec(cmd);
                      BufferedReader br = new BufferedReader(
                                      new InputStreamReader(cp.getInputStream()));
                      String line = null;
                      while ((line = br.readLine()) != null)
                                      System.out.println(line);
              }
              catch (Throwable e) {
              }
      }

            never Tom Rodriguez
            mseino Masayuki Seino (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: