当我将它打包到applet时,我在浏览器中运行griffon applet时遇到问题。浏览器尝试执行我的applet时发生此错误: -
org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack:没有这样的属性:class的resourceResolver:griffon.swing.SwingApplet
我的html页面如下: -
<script src="http://java.com/js/deployJava.js"></script>
<script>
var attributes = {id: 'Mocha',
codebase:'http://localhost:8080/testapplet/applet',
code:'griffon.swing.SwingApplet',
archive:'griffon-swing-runtime-1.2.0.jar,griffon-rt-1.2.0.jar,groovy-all-2.0.6.jar,jcl-over-slf4j-1.7.2.jar,jul-to-slf4j-1.7.2.jar,log4j-1.2.17.jar,mocha.jar,slf4j-api-1.7.2.jar,slf4j-log4j12-1.7.2.jar',
width:'320', height:'240'} ;
var parameters = {fontSize:16,
java_arguments: "-Djnlp.packEnabled=false",
//jnlp_href:'http://localhost:8080/testapplet/applet/applet.jnlp',
draggable:'true',
image:'griffon.png',
boxmessage:'Loading Mocha',
boxbgcolor:'#FFFFFF', boxfgcolor:'#000000',
codebase_lookup: 'false'} ;
var version = '1.5.0' ;
deployJava.runApplet(attributes, parameters, version);
</script>
我的applet.jnlp: -
<jnlp
version="0.1"
codebase="http://localhost:8080/testapplet/applet"
href="applet.jnlp"
>
<information>
<title>mocha 0.1</title>
<vendor>cipon</vendor>
<homepage href="http://localhost:8080/testapplet"/>
<!--fallback description-->
<description>mocha 0.1</description>
<description kind="one-line">mocha 0.1</description>
<description kind="short">mocha 0.1</description>
<description kind="tooltip">mocha 0.1</description>
<!-- default icon -->
<icon href="griffon-icon-64x64.png" kind="default" width="64" height="64"/>
<!-- icon used for splash screen -->
<icon href="griffon.png" kind="splash" width="391" height="123"/>
<!-- icon used in selected -->
<icon href="griffon-icon-64x64.png" kind="selected" width="64" height="64"/>
<!-- icon used on disabled -->
<icon href="griffon-icon-64x64.png" kind="disabled" width="64" height="64"/>
<!-- icon used on rollover -->
<icon href="griffon-icon-64x64.png" kind="rollover" width="64" height="64"/>
<!-- icon used on shortcut -->
<icon href="griffon-icon-64x64.png" kind="shortcut" width="64" height="64"/>
<!-- to create shortcuts, uncomment this
<shortcut online="true">
<desktop/>
<menu submenu="Mocha"/>
</shortcut>
-->
<offline-allowed/>
</information>
<security>
<all-permissions/>
<!--<j2ee-application-client-permissions/>-->
</security>
<resources>
<property name="griffon.runmode" value="applet"/>
<property name="jnlp.packEnabled" value="true"/>
<j2se version="1.5+" />
<!-- auto-added jars follow, griffon-rt, app, and groovy -->
<jar href='griffon-swing-runtime-1.2.0.jar' main='true'/>
<jar href='griffon-rt-1.2.0.jar'/>
<jar href='groovy-all-2.0.6.jar'/>
<jar href='jcl-over-slf4j-1.7.2.jar'/>
<jar href='jul-to-slf4j-1.7.2.jar'/>
<jar href='log4j-1.2.17.jar'/>
<jar href='mocha.jar' main='false' />
<jar href='slf4j-api-1.7.2.jar'/>
<jar href='slf4j-log4j12-1.7.2.jar'/>
<!-- Add all extra jars below here, or the app may break -->
</resources>
<applet-desc
documentbase="http://localhost:8080/testapplet/applet"
name="MochaApplet"
main-class="griffon.swing.SwingApplet"
width="320"
height="240">
<!-- params are ignored when referenced from web page for 6u10 -->
<!--<param name="key1" value="value1"/>-->
<!--<param name="key2" value="value2"/>-->
</applet-desc>
</jnlp>
谢谢。
答案 0 :(得分:0)
已确定并修复了该问题,有关详细信息,请参阅https://jira.codehaus.org/browse/GRIFFON-641。事实证明griffon.swing.AbstractSwingApplet
没有公开resourceResolver
。 swing
插件的1.3.1版解决了这个问题。