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

Difference between 1.1 and 1.2 in calling Runtime.exec from javaw.exe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      Run the following program in 1.1.6 and 1.2 with javaw.exe:

      u:/jdk1.1.6/win32/bin/javaw.exe E
      u:/jdk1.2/win32/bin/javaw.exe E

      You will notice that 1.1.6 does not create a console window,
      whereas 1.2 does.


      import java.io.*;
      import java.awt.Frame;
      import java.awt.event.*;

      public class E {
          public static void main(String[] args) throws Exception {
      String java = System.getProperty("java.home") +
      File.separator + "bin" + File.separator + "java";
              String cmd = java + " E$Hello";
              Process p = Runtime.getRuntime().exec(cmd);
      p.waitFor();
          }

          static public class Hello {
      public static void main(String[] args) {
      Frame frame = new Frame("Hello, world!");

      WindowListener l = new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
      System.exit(0);
      }
      };
      frame.addWindowListener(l);
      frame.setSize(200, 200);
      frame.setLocation(100, 100);
      frame.setVisible(true);
      }
          }
      }

      anand.palaniswamy@Eng 1998-11-06

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hongzh Hong Zhang
              Reporter:
              apalanissunw Anand Palaniswamy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: