通过 webstart 启动 Gluon 应用程序时出现以下异常...我知道这与 GLUON 粒子没有直接关系... jar 标志似乎更多问题。例外:
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at com.gluonhq.particle.application.Particle.<init>(Particle.java:170)
at com.gluonhq.particle.application.ParticleApplication.<init>(ParticleApplication.java:89)
at mx.gob.scjn.inventario.InventarioAJ.<init>(InventarioAJ.java:22)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(Unknown Source)
at com.sun.javafx.application.PlatformImpl.runLater(Unknown Source)
at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(Unknown Source)
at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(Unknown Source)
at javafx.scene.control.Control.<clinit>(Unknown Source)
... 28 more
我已经使用以下方法创建了我的证书:
keytool -genkey -keyalg rsa -alias CLS -keystore mykeyStorte
然后导出它:
keytool -export -alias CLS -file rsatest.cer -keystore mykeyStore
我导入到 java 控制面板并使用以下命令对 jar 进行签名:
jarsigner -keystore mykeyStore InventarioAJ.jar CLS
显然我错过了一些东西......¿任何线索?问候在得到答案后,我得到了一个“重复的问题”标记......但正确的答案不是(如我所想)只是安全/签名部分......事实上,答案的真实和重要部分有与 Application 类不能转换为 applet 并且需要对 JNLP 文件进行另一项更改这一事实有关。