import java.rmi.*; // rmi bounded buffer consumer client process (as opposed to thread) public class bbconsumer { public static void main(String[] args) { rmibb buf; try { // args[0] = bbserver name in registry, args[1] = hostname buf = (rmibb) Naming.lookup("rmi://" + args[1] +"/"+args[0]); while (true) System.out.println(buf.consume()); } catch (Exception ee) {ee.printStackTrace();} } //main } // bbconsumer