ports/188980: java.io.ProcessBuilder not working in openjdk-7.55.13_3, 1

Jimmy Kelley ljboiler at gmail.com
Fri Apr 25 01:20:00 UTC 2014


>Number:         188980
>Category:       ports
>Synopsis:       java.io.ProcessBuilder not working in openjdk-7.55.13_3,1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 25 01:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Jimmy Kelley
>Release:        10-STABLE
>Organization:
>Environment:
FreeBSD jmobile.jimmy.localnet 10.0-STABLE FreeBSD 10.0-STABLE #0 r264363: Fri Apr 11 23:30:48 CDT 2014     root at jmobile.jimmy.localnet:/usr/obj/usr/src/sys/TOSHIBA  amd64
>Description:
The java.io.ProcessBuilder function was working in openjdk-7.51.13_2,1 but is broken in openjdk-7.55.13_3,1; it throws an IOException, "no such file or directory" no matter what command string is supplied (even with a full path).  The problem does not exist in openjdk6 or openjdk8.

>How-To-Repeat:
Simple program that demonstrates the problem:

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class PBuilder {
  public static void main(String args[]) {
    try {
      Process p = new ProcessBuilder("/bin/date").start();

      //Read out dir output
      InputStream is = p.getInputStream();
      InputStreamReader isr = new InputStreamReader(is);
      BufferedReader br = new BufferedReader(isr);
      String line;
      System.out.printf("Output of running is:\n");
      while ((line = br.readLine()) != null) {
        System.out.println(line);
      }
        
      //Wait to get exit value
      try {
        int exitValue = p.waitFor();
        System.out.println("\n\nExit Value is " + exitValue);
      } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
      }
    }
    catch(java.io.IOException e) {
      e.printStackTrace();
    }
  }
}
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list