This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes in rmi  Its necessary  to manually copy a Class file for remote interface in client directory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "in rmi  Its necessary  to manually copy a Class file for remote interface in client directory?" Watch "in rmi  Its necessary  to manually copy a Class file for remote interface in client directory?" New topic
Author

in rmi Its necessary to manually copy a Class file for remote interface in client directory?

dashang trivedi
Greenhorn

Joined: Mar 01, 2010
Posts: 26
Its possible to load class dynamically ...from any other location...
how its done......
Mohamed Jeleel
Greenhorn

Joined: Mar 22, 2010
Posts: 18
through RMI.

It will do loading classes dymanically. It needs only the class objects to be loaded.
dashang trivedi
Greenhorn

Joined: Mar 01, 2010
Posts: 26
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.......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: in rmi Its necessary to manually copy a Class file for remote interface in client directory?
 
Similar Threads
tic tac toe and switch statement
More then the specified answer?
Help on sequential method execution
Java learning
what is the replace method for getBinaryOutputStream() ?