Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Question - Code Loading with RMI + Ignore Prev. Posting

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic