Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question - Code Loading with RMI + Ignore Prev. Posting

 
Varun Rupela
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic