Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI in Java 2 SDK, v1.3  RSS feed

 
Hamwira, Yaacob
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try specifying a Java2 security policy file that grants socket access.
 
Hamwira, Yaacob
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!