-
RMI!Exceptions!SOS
people my problem is explianed in detail below.
//the remote interface:
import java.rmi.*;
public interface inter extends Remote
{String get(String msg) throws RemoteException;}
//this compiles fine and i have saved it in my server directory.
server programming:
import java.rmi.*;
import java.rmi.server.*;
public class serve extends UnicastRemoteObject implements inter
{public serve() throws RemoteException
{super();}
public String get(String msg) throws RemoteExeption{return(msg);}
public static void main(String s[])
{System.setSecurityManager(new RMISecurityManager());
try{serve si= serve();
Naming.rebind("what?',s1);
System.out.println("i'm registered");}
catch(Exception e)
{System.out.println("error");}
}
}
//the above program compiles fine but while running gives me the "error"
output
.(my client side program runs fine)
//by placing various System.out.println statements i could deduce that the
problem is arisisng when i am intantiating the object of serve i.e. it throws
a RemoteException...why?
help required.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks