You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of deprecation of the Security Manager APIs becoming an error in Java 18 kt_jvm_test will fail with the following error:
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:429)
at com.google.testing.junit.runner.junit4.JUnit4Runner.installSecurityManager(JUnit4Runner.java:256)
at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:113)
at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:145)
at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:76)
This can be worked around by specifying the appropriate JVM flags in .bazelrc:
common --jvmopt=-Djava.security.manager=allow
The correct fix however would be to port across the change made to the upstream Java test rule and read the runtime version from JavaRuntimeInfo and conditionally set the appropriate JVM option, see the Bazel issue for more details including the linked fix commit: bazelbuild/bazel#16421
The text was updated successfully, but these errors were encountered:
Because of deprecation of the Security Manager APIs becoming an error in Java 18
kt_jvm_test
will fail with the following error:This can be worked around by specifying the appropriate JVM flags in
.bazelrc
:The correct fix however would be to port across the change made to the upstream Java test rule and read the runtime version from
JavaRuntimeInfo
and conditionally set the appropriate JVM option, see the Bazel issue for more details including the linked fix commit: bazelbuild/bazel#16421The text was updated successfully, but these errors were encountered: