2

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?

tsds
  • 8,700
  • 12
  • 62
  • 83

2 Answers2

4

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.

Ortwin Angermeier
  • 5,957
  • 2
  • 34
  • 34
  • Any ideas about alternative locations? ${JAVA_HOME/bin} is on a read-only filesystem which I don't control here. – kittylyst Feb 23 '12 at 16:54
1

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.

Mick Knutson
  • 2,297
  • 3
  • 25
  • 48