In serever directory
three file
calc.java(interface)
calcimpl.java
calcserver.java
In client directory......
public class CalcClient
{
public static void main(
String args[])throws RemoteException,NamingException
{
System.setProperty("java.security.policy","client.policy");
System.setSecurityManager(new SecurityManager());
Context nc=new InitialContext();
try
{
Calc c = (Calc)nc.lookup("rmi://localhost/Calc_Service");
System.out.println("3");
System.out.println("addition-->"+ c.add(10,10));
System.out.println("Subtraction-->"+ c.sub(5,6));
System.out.println("Multiplication-->"+ c.mul(5,3));
System.out.println("Division-->"+ c.div(10,5));
}
catch(Exception e)
{
System.out.println("Error" + e );
}
}
}
it will give Exception class not found.....
If i manually copy Calc.class file in client directory....then program success fully run...........
so any body know HOW THE DYNAMIC DOWNLOADING is done.......