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
posted
0
Try specifying a Java2 security policy file that grants socket access.
Hamwira, Yaacob
Greenhorn
Joined: May 23, 2001
Posts: 5
posted
0
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
posted
0
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
posted
0
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