944,189 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 816
  • Java RSS
Jun 17th, 2007
0

Java rmi-ps help

Expand Post »
I've tried to run the code below for several hours and this is the error it gives me:
G:\Distributed Objects\Exercise 3\BankServer.java:11: cannot find symbol
symbol : constructor BankImpl()
location: class BankImpl
BankImpl b = new BankImpl();

I have other classes orf the Bank interface, BankImpl and BankClient but they're all working fine.ps help.




//BankServer
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class BankServer
{
public static void main(String[] args) throws Exception
{
try{
BankImpl b = new BankImpl();

//'0' denotes location where exported object 'c' is to be stored
Bank stub = (Bank)UnicastRemoteObject.exportObject(b,0);
Registry registry = LocateRegistry.getRegistry();
registry.rebind("BankService", stub);
System.out.println("Bank server running");
BankImpl[] account =
{new BankImpl(111111, "Smith", "James", 112.58),
new BankImpl(222222, "Jones", "Sally", 507.85),
new BankImpl(333333, "White", "Mary Jane", 2345.00),
new BankImpl(444444, "Brooks", "Mark", 10028.00)};
for (int i=0; i<account.length; i++)
{
int accountNumber= account[i].getAcctNum();
}
}catch(Exception e){
System.out.println("Trouble: " + e);
}
}
}
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ssimkhan is offline Offline
6 posts
since May 2007
Jun 18th, 2007
0

Re: Java rmi-ps help

Copy the classes in same directory.
Last edited by ithelp; Jun 18th, 2007 at 9:03 am.
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: how to make standalone code out of NetBeans IDE
Next Thread in Java Forum Timeline: how to javac mycode.java and swing-layout-1.0.jar





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC