Where to place jstatd.all.policy

8.2k views Asked by At

I'd like to grant permissions to my jstatd on linux
The corresponding manual reads:

To use this policy, copy the text into a file called jstatd.all.policy and run the jstatd server as follows:

jstatd -J-Djava.security.policy=jstatd.all.policy

But where on linux should I place this jstatd.all.policy file?

2

There are 2 answers

1
Ortwin Angermeier On BEST ANSWER

As far as i remember you have to create the file in the same location as jstatd (...jdk/bin/) and it should work.

Update: From here:

The user policy file is by default located at

user.home/.java.policy (Solaris/Linux)

user.home\.java.policy (Windows)

Note: user.home refers to the value of the system property named "user.home", which specifies the user's home directory.

0
Mick Knutson On

You can also give a full path to the policy that would be used such as:

jstatd -p 1099 -J-Xrs -J-Djava.security.policy=C:\jstatd\tools.policy

This is helpful if you are on a shared machine and want a central place to add policies.