【问题标题】:How can I configure, disable, or override the sbt SecurityManager?如何配置、禁用或覆盖 sbt SecurityManager?
【发布时间】:2021-06-11 23:50:13
【问题描述】:

我正在尝试将 Apache Derby 嵌入到应用程序中。当我直接从 IntelliJ 运行它时,一切正常,但 sbt run 生成异常:

Caused by: java.security.AccessControlException: access denied org.apache.derby.security.SystemPermission( "engine", "usederbyinternals" )

这似乎与 SBT 使用的 SecurityManager 有关。有没有办法禁用、重新配置或覆盖默认的 SBT SecurityManager?

【问题讨论】:

    标签: sbt java-security-manager


    【解决方案1】:

    JGC 提供the insight in this question

    在相关应用中:

    System.setSecurityManager(null)
    

    或者,可以通过这种方式简单地提供首选安全管理器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-24
      • 1970-01-01
      • 1970-01-01
      • 2021-10-31
      • 2019-05-06
      • 2014-06-10
      • 2018-04-09
      相关资源
      最近更新 更多