This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hi: I am trying to do Dynamic Code Loading with RMI and am encountering the following problem: - I am not sure if it is a problem with the SecurityManager but following is the exception that I get:
- I am using JDK 2.2, Standard Edition, v 1.3.0. - In my application the stub is not available to the client locally and so the client must dynamically load the stub. - As per Sun's RMI Tutorial - http://java.sun.com/docs/books/tutorial/rmi/running.html, I have used the following Security policy file to set up the Security Manager: File Name: - "java.policy"
- The client code begins with the following lines:
- I run the client with the following command java -Djava.rmi.server.codebase=http://localhost/~username/dist_obj_client/ -Djava.security.policy=java.policy clientdb_pkg.clientdb URL_remotehost - If I use the above command to run the client program, I get the following output before the exception occurs: "Security Policy Not Set". Q1 - Is that expected? Shouldn't the SecurityManager be set to the java.policy file and not to a RMISecurityManager object? Q2 - Does the exception mean that it might be a problem with the CLASSPATH of the shell in which RMI is started? Thank you.
Varun Rupela<br />Graduate Research Assistant<br />Department of Computer Science and Software Engineering.<br />Auburn University.