What is the difference between java command line arguments and C command line arguments?
Read Answer(1) | 485 Views |
When i am working with Rmi “Hello world” program without Stub and skeleton the program has been working .
This is remote interface
import java.rmi.*;
public interface SmallInter extends Remote {
public String getMesg(String s) throws RemoteException;
}
This is my server side program
import java.rmi.*;
import java.rmi.server.*;
public class SmallServer extends UnicastRemoteObject implements SmallInter
//to convert local object into remote object
{
public SmallServer() throws RemoteException {
}
public String getMesg(String s) throws RemoteException {
String s1 = “This is a message from server after a message” + s;
return s1;
}
public static void main(String arg[]) {
try {
SmallServer ser = new SmallServer();
Naming.rebind(”small”, ser);
System.out.println(”server ready”);
} catch (Exception e) {
e.printStackTrace();
}
}
}
This is my Client side code:
import java.rmi.*;
public class SmallClient {
public static void main(String arg[]) {
try {
SmallInter remobj=(SmallInter)Naming.lookup(”rmi://”+arg[0] +”/small”);
System.out.println(remobj.getClass());
String res = remobj.getMesg(”from client”);
System.out.println(res);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
but when printing the remobj.getClass() it will retuen some “class $proxy”
How this is possible?
please give me the answer………..
Post An Answer | 197 Views |
How do you pass data (including JavaBeans) to a JSP from a servlet?
Read Answer(1) | 1,618 Views |
What is the difference between doPost and doGet methods?
Read Answer(1) | 1,138 Views |
How can you minimize the need for garbage collection and make memory use more effective?
Read Answers(2) | 1,614 Views |
What is the primary difference between a Vector and an ArrayList?
Read Answer(1) | 1,494 Views |
What is the difference between yield() and sleep()?
Read Answers(2) | 1,312 Views |
What are transient variables in java?
Read Answers(2) | 1,313 Views |
What is the difference between JSP and Servlets?
Read Answer(1) | 1,243 Views |
Macros and function are related in what aspect?
Read Answers(2) | 2,369 Views |