The moose likes Distributed Java and the fly likes RMI in Java 2 SDK, v1.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "RMI in Java 2 SDK, v1.3" Watch "RMI in Java 2 SDK, v1.3" New topic
Author

RMI in Java 2 SDK, v1.3

Hamwira, Yaacob
Greenhorn

Joined: May 23, 2001
Posts: 5
Hello..
I have been doing RMI in JDK1.1.7 and it is working well.
But when I use the same code under Java 2 SDK, v1.3, it gave me java.net.SocketPermission error..
How do I solve this prob??
Badly need help..
HAMWIRA
Doug Melzer
Ranch Hand

Joined: Mar 23, 2000
Posts: 51
Try specifying a Java2 security policy file that grants socket access.
Hamwira, Yaacob
Greenhorn

Joined: May 23, 2001
Posts: 5
Yap, I have specified the policy..
In my "policy.all" file, I wrote
grant {
permission java.security.AllPermission "", "";
};

and to run the server I put command
java -Djava.security.policy=policy.all vServer
In the SocketPermission class doumentation from java.sun.com, I noticed
p1 = new SocketPermission("localhost", "accept, connect,
listen");
Can I apply this concept? How do I make use of it??
Thank you..
Badly need help..
WIRA
Bilal Ahmed
Greenhorn

Joined: Jun 25, 2001
Posts: 3
Hi,
Have u over come the problem. I am also getting the
same error. My RMI server is written in Microsoft SDK4.
My complete question is posted with the subject
"RMI server written in MS SDK4" 25th June 2001.
I also badly need help
Maany thanks
Bilal
sushil_patra
Greenhorn

Joined: Jul 07, 2001
Posts: 1
hi!
if u have yet not found a solution try specifying the full path of the policy file like
-Djava.security.policy=file:/D:/..../policyfilename
Secondly:
u can create a policy file using a policytool provided with jdk1.3
it provides for creating socket permissions too.
sushil
 
 
subject: RMI in Java 2 SDK, v1.3
 
Threads others viewed
Property tutorial.home circularly define error!
Path and ClassPath issues (I think)
RMI with Java 2 SDK
What sdk's to load
What is a javax.naming. NoInitialContextException ??