Details
-
Bug
-
Resolution: Fixed
-
P3
-
18
-
b29
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8279171 | 19 | Kevin Walls | P3 | Resolved | Fixed | b04 |
JDK-8279752 | 18.0.1 | Kevin Walls | P3 | Resolved | Fixed | b02 |
Description
In JDK 18, attempting to run jstatd results in the following:
$ jstatd
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:416)
at jdk.jstatd/sun.tools.jstatd.Jstatd.main(Jstatd.java:136)
The workaround is to allow setting the security manager property on the command line to allow programmatic setting of the security manager:
$ jstatd -J-Djava.security.manager=allow
Alternatively, the security manager could be enabled directly on the command line:
$ jstatd -J-Djava.security.manager
Either works, though they give different warning messages.
The property should be set by the jstatd launcher instead of requiring the user to provide it.
$ jstatd
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:416)
at jdk.jstatd/sun.tools.jstatd.Jstatd.main(Jstatd.java:136)
The workaround is to allow setting the security manager property on the command line to allow programmatic setting of the security manager:
$ jstatd -J-Djava.security.manager=allow
Alternatively, the security manager could be enabled directly on the command line:
$ jstatd -J-Djava.security.manager
Either works, though they give different warning messages.
The property should be set by the jstatd launcher instead of requiring the user to provide it.
Attachments
Issue Links
- backported by
-
JDK-8279171 jstatd fails to start because SecurityManager is disabled
- Resolved
-
JDK-8279752 jstatd fails to start because SecurityManager is disabled
- Resolved
- relates to
-
JDK-8270380 Change the default value of the java.security.manager system property to disallow
- Resolved