$ javaws "viewer.jnlp(192.168.1.90@0@1528717013602)"
netx: Initialization Error: Could not initialize application. (Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:817)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:529)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:940)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2481)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:385)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:806)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:338)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:421)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:495)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:468)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:809)
... 2 more
解决方案:
重要: 每次修改配置请清理浏览器的缓存!!!(例如: firefox 清理缓存方法 Settings - Privacy & Security - Cookies and Site Data - Clear Data - [选择 Cached Web Content] - Clear)
请先尝试步骤一,如果仍然不可用,可再继续尝试步骤二。
步骤一(原文链接: https://velenux.wordpress.com/2017/06/07/workaround-for-javaws-jnpl-error-cannot-grant-permissions-to-unsigned-jars/):
找到 java.security 文件
例如 /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
找到下面的配置
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
删除 MD5
#jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024
步骤二(原文链接:https://blog.csdn.net/qq_18895659/article/details/117987623):
找到 java.security 文件
例如 /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
将下面使用 "#" 注释
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves
改为:
# jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
# DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
# include jdk.disabled.namedCurves