aspose file tools
The moose likes Tomcat and the fly likes Where to place the java.policy file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Where to place the java.policy file" Watch "Where to place the java.policy file" New topic
Author

Where to place the java.policy file

Kiran Baratam
Greenhorn

Joined: Sep 03, 2003
Posts: 27
Dear All
I am able to connect to the rmi server from an application.when i try to connect to RMI server from a servlet its giving the following exeception.
java.security.AccessControlException: access denied (java.net.SocketPermission t
kd-imsyb-01.tk.jp.chase.com resolve)
I realized that its not able to locate the java.policy file.
Please tell me where should i copy the java.policy file.
tomcat is in the following directory.
c:\programfiles\apachegroup\tomcat4.1\....
Regards
Kiran
Regards
Ramesh
Annemarie McKeown
Ranch Hand

Joined: Nov 07, 2003
Posts: 47
If your using a MSWindows machine, try the following to create a .java.policy file
- Go into Dir where you have your j2sdk installed eg, <c:/j2sdk1.4.1_05/bin>
-Launch policytool.exe
-If you don't already have a .java.policy file it will display in a small window 'Could not find .java.policy file in <target_dir>
This is where you want to create a java.policy file and save it. To do this:
-Click on Add Policy Entry button.
-Click on Add Permission button.
-Select All Permission from Permission combobox.
-Click on OK.
-Click on Done.
-Go to file->Save As
-File name will be called .java.policy
And Target Directory should be <target_dir> see above.
Example of target directory:
c:/Documents and Settings/Admistrator/.java.policy

Hopefully this should work.
amo.
-
 
 
subject: Where to place the java.policy file
 
Threads others viewed
Restrict the other IP addresses call to our main server
java.policy file
Servlet communicates to RMI Server
java.policy
to copy a policy file from server machine to client machine in java
Two Laptop Bag