• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rmi activation on win-NT,win 2k  RSS feed

 
abhi zulu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey javaites!!
i tried activation(rmi) , it works fine
on win98,95 . but it gives a socket exception
if run on win-nt or win2k. i tried to change the policy file too ..
example:
permission java.net.SocketPermission "localhost:1024-", "listen"//connect,accept,resolve

but it didnt work ...plz help me asap
thanx for ur time
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ordinaryguy java" -
The onscreen name you have chosen does not conform to Javaranch's naming policy. Please review our policy and change your name accordingly.
Thanks,
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to establish permission for your program to access things on win2K and NT. when you run your program you should run it with a commandLine option pointing it to a permission file that gives your program permission to access the resources you seek.
The policytool.exe will help you create the appropriate permission file.

Here is an example of a lazy man's policy file

grant {
permission java.security.AllPermission;
};

Here is how you start your program with it
java.exe -Djava.security.policy=filepath -jar ChessOne.jar
I think you can figure out the rest. This is not the only way to use a policy file and I used this back in the 1.3 days so I hope it applies to 1.4 as well...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!