仅当我尝试在 griffon 中将其作为 webstart 或 applet 运行时,我的应用程序中才会出现以下错误:
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
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.setSecurity(JNLPClassLoader.java:312)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:232)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:357)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:330)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
... 2 more
我需要在我的代码中添加什么来克服这个问题(我正处于开发阶段,还不想部署)?
我使用了命令:“griffon run-webstart -clean”
这是我的控制器文件:
package test1
import griffon.util.GriffonNameUtils as GNU
import griffon.transform.Threading
class Test1Controller {
def model
def clear = {
model.griffonClass.propertyNames.each { name -> model[name] = ''
}
}
@Threading(Threading.Policy.SKIP)
def submit = {
java.swing.JoptionPane.showMessageDialog(
app.windowManager.windows.find{it.focused},
model.griffonClass.propertyNames.collect([]) {
name -> "${GNU.getNaturalName(name)} = ${model[name]}"
}.join('n')
)
}
}