File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI problems" Watch "RMI problems" New topic

RMI problems

Jason Ho

Joined: Nov 22, 2001
Posts: 5
Hi all,
I am very new to RMI and so I downloaded the code from Sun tutorial on RMI and try it out. And I am stucked at the last part. When I run the server is give me the following error messsages :
ComputeEngine exception:access denied < host resolve> denied
< host resolve>
at java.secrity.AccessControlContext.checkPermission(Unknown Source)
at java.secrity.AccessController.checkPermission(Unknown Source)

I hope someone can help me .Thanks
Reshma Das
Ranch Hand

Joined: Jan 29, 2002
Posts: 125
try creating policy file. even iam not sure abt R MI exceptions. once i got a problem i forgot . u can read my postings from this site.
1. try creating RMIRegistry
2. put the server object to this regitry
3. create client class
HanMing Low
Ranch Hand

Joined: Oct 18, 2001
Posts: 196
Not too sure how your code looks like.
But if you have the following line in your code.

Then, it is because the SecurityManager is denying you to access the Socket.
What you need to do is create a file named policy (or anything you like).
Add the following line to the policy file,
grant {
Then, start your application by
This should make your application run.
However, granting permission to all is not recommended for production software.
So, you may wish to start your application by
for testing.
And you should find exactly which permission is denied and grant them accordingly using policytool.
Hope this helps.

Han Ming
Jason Ho

Joined: Nov 22, 2001
Posts: 5
I solved the problem.
Thanks Reshma and HanMing.
khad M
Ranch Hand

Joined: Nov 26, 2001
Posts: 48
Originally posted by Jason Ho:
I solved the problem.
Thanks Reshma and HanMing.

In that sun example.....
what is meant by server.
B'cas iam able to run rmiregistry.
But what ia this server and where it is?

Khad M
I agree. Here's the link:
subject: RMI problems
It's not a secret anymore!