try {
System.setSecurityManager(new RMISecurityManager());
// Lookup account object
Account jimAcct = (Account)Naming.lookup("rmi://192.168.0.1/JimF");
// Make deposit
jimAcct.deposit(12000);
// Report results and balance.
System.out.println("Deposited 12,000 into account owned by " +
jimAcct.getName());
System.out.println("Balance now totals: " + jimAcct.getBalance());
}
catch (Exception e) {
System.out.println("Error while looking up account:");
e.printStackTrace();
}