Windows 10 + OpenJDK 上的 JAVA UnsupportedOperationException(安全管理器已弃用)

Windows 10 + OpenJDK 上的 JAVA UnsupportedOperationException(安全管理器已弃用)

我在 Windows 10 上使用 OpenJDK。

C:\Users\divym>java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_332-b09)
OpenJDK 64-Bit Server VM (Temurin)(build 25.332-b09, mixed mode)

C:\Users\divym>

在执行 JAVA web 应用程序 (*.jnlp) 时,出现以下异常:

[divym][ITW-JAVAWS][WARNING_ALL][Fri Nov 24 18:40:52 IST 2023][net.sourceforge.jnlp.util.logging.FileLog.getHeadlineHeader(FileLog.java:53)] NETX Thread# 2b053c0b, name Output controller consumer daemon writer-based impl.
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:429)
    at net.sourceforge.jnlp.runtime.JNLPRuntime.initialize(JNLPRuntime.java:268)
    at net.sourceforge.jnlp.runtime.Boot.init(Boot.java:353)
    at net.sourceforge.jnlp.runtime.JnlpBoot.run(JnlpBoot.java:58)
    at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:274)
    at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:63)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
    at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:214)

在我将 URL 添加到 Java 控制面板 -> 安全 -> 例外站点列表后,此应用程序之前可以在我的设备上运行,设备装有 Oracle JAVA。

在 IcedTea-Web 控制面板中,我没有看到任何类似的选项。我尝试将安全级别设置为低。但这没有帮助。

在此处输入图片描述

请帮忙解决这个问题。

相关内容