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

Solaris: java wrapper uses external command "cut" without absolute pathname

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic
    • OS:
      solaris_8
    • Verification:
      Verified

      Description



      Name: egR10015 Date: 01/29/2001



      The script .java_wrapper of version 1.67 00/12/05 from Solsparc jdk1.4.0-b49
      and Solx86 jdk1.4.0-b49 uses external command "cut" without absolute pathname
      /usr/bin (see line #46). It leads to the error: "cut: not found".
      Note, that all other external commands in the script are correctly used with
      appropriate absolute pathes.

      Example consists of the two following programs.
      Here is the main program:
      ------------------------------- test.java --------------------------------------
      import java.io.BufferedReader;
      import java.io.InputStreamReader;
      import java.io.IOException;

      public class test {
          public static void main(String args[]) {
              String[] env = { "PATH=/usr/local/bin" };
              String s;

              try {
                  Process proc = Runtime.getRuntime().exec(System.getProperty("java.home") +
                                                           "/bin/java test1", env);

                  BufferedReader pout = new BufferedReader(new
                      InputStreamReader(proc.getInputStream()));
                  BufferedReader perr = new BufferedReader(new
                      InputStreamReader(proc.getErrorStream()));
                  while ((s=pout.readLine())!=null)
                      System.out.println(s);
                  while ((s=perr.readLine())!=null)
                      System.err.println(s);
              } catch (IOException e) {
                  System.err.println("EXEC ERROR : "+e.getMessage());
              }
          }
      }
      --------------------------------------------------------------------------------

      Here is the invoked program:
      ----------------------------- test1.java ---------------------------------------
      public class test1 {
          public static void main(String args[]) {
              System.out.println("test1: OK!");
          }
      }
      --------------------------------------------------------------------------------

      To reproduce the bug compile test.java and test1.java and run the test class.

      --------------------- output from Solsparc jdk1.4.0-b49 ------------------------
      $ /home/eug/hotspot/jdk1.4/solsparc/bin/java -version
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b49)
      Java HotSpot(TM) Client VM (build 1.4beta-B49, mixed mode)
      $ /home/eug/hotspot/jdk1.4/solsparc/bin/java test
      test1: OK!
      /export/ld50/java/dest/jdk1.4.0beta-b49/solsparc/jre/bin/java[46]: cut: not found
      /export/ld50/java/dest/jdk1.4.0beta-b49/solsparc/jre/bin/java[46]: test: argument expected
      --------------------------------------------------------------------------------

      --------------------- output from Solsparc jdk1.4.0-b47 ------------------------
      $ /home/eug/hotspot/jdk1.4/solsparc.b47/bin/java -version
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b47)
      Java HotSpot(TM) Client VM (build 1.4beta-B47, mixed mode)
      $ /home/eug/hotspot/jdk1.4/solsparc.b47/bin/java test
      test1: OK!
      --------------------------------------------------------------------------------

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gafter Neal Gafter
                Reporter:
                eugsunw Eug Eug (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: