UNIX command

Hosei Matsuoka matsuoka at ohnolab.org
Wed Jan 20 08:52:52 PST 1999

I just downloaded kaffe-1.0.b1.bsd3.1.src.tar and install it to my PC.
but the class Process don't run completely. Especially, the method 
"getInputStream" in Process class don't work.
There is kaffe.lang.UNIXProcess class, but I don't know how to use 
this class. I want to use UNIX command.
Can anybody tell me about that?

/*This is a sample program.*/
import java.io.*;

public class Df{
  public static void main(String argv[]){


      Runtime r = Runtime.getRuntime();
      Process p = r.exec("/bin/df");

      InputStream i = p.getInputStream();
      DataInputStream in = new DataInputStream(i);

      String line;

      while((line = in.readLine()) != null){
    }catch(Exception e){

/* This is the error message */
java.io.EOFException: null stream

Hosei Matsuoka<matsuoka at ohnolab.org>
The Department of Information Science
Tokyo Institute of Technology

More information about the kaffe mailing list