I have created a jar of my socket program. When I run this jar on a Windows system for the first time it asks for public and home network access. If the user grants them then it works fine and accepts requests from public user's. But if the user denies it then it only works if the firewall is turned off. I want that each time the user runs my jar it should ask for file network access permissions so that in case the user denies it for the first time he can give those permissions next time.
feedback
|
migrated from stackoverflow.com Jun 29 '11 at 13:20
This question came from our site for professional and enthusiast programmers.
|
You can't. This behaviour depends only on the user's Windows' firewall configuration, there is nothing you can do about it in your program. Furthermore, Java isn't supposed to access such system specific details. | |||||||||||
feedback
|
|
You can have a policy file in your jar, the policy file containing the required permissions for the application. To know more about policy files, check this link | |||
feedback
|