| | |
Java rmi-ps help
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2007
Posts: 6
Reputation:
Solved Threads: 0
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.
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);
}
}
}
Copy the classes in same directory.
Last edited by ithelp; Jun 18th, 2007 at 9:03 am.
![]() |
Similar Threads
- is it possible for PHP to call API written on java ? HELP (Java)
- Error in exception(RMI) (Java)
- Java rmi-Ps help (Java)
- Java EE (Java)
- URGENT: FTP Client / Server using RMI (Java)
- Playing with RMI in Tiger (Java)
Other Threads in the Java Forum
- Previous Thread: public vs private
- Next Thread: how to javac mycode.java and swing-layout-1.0.jar
| Thread Tools | Search this Thread |
Tag cloud for Java
-xlint android animated api appinventor apple applet application arguments array arrays automation bi binary blackberry bluetooth chat class classes client code compile compiler component database draw eclipse error event exception file fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health helpwithhomework html ide image input integer j2me java javaprojects jetbrains jmf jni jpanel jtable julia learningresources linux list login loop main map method methods mobile myregfun netbeans newbie notdisplaying number object oracle page print problem program programming project qt recursion scanner screen server set size sms socket sort spamblocker sql string swing system test threads time tree variablebinding windows xor






