【发布时间】:2014-10-27 12:56:55
【问题描述】:
我从 7.0.1 更新到 Netbeans 8.0.1,如果禁用“Web Start”,我的 java 程序编译得很好。一旦启用“Web Start”,我就会收到以下错误:
C:\NetBeansProjects\SearchCriteriaEditor\nbproject\jnlp-impl.xml:480:
unsupported element customize
-
在 jnlp-impl.xml 文件的这一部分中:
<target name="-do-jar-jnlp-application" depends="-init-filename,-test-jnlp-type,-init-macrodef-copylibs" if="is.application+mkdist.available"> <j2seproject3:copylibs manifest="${tmp.manifest.file}"> <customize> <attribute name="Main-Class" value="${main.class}"/> </customize> </j2seproject3:copylibs> <echo>To run this application from the command line without Ant, try:</echo> <property location="${jnlp.dest.dir}/${jnlp.file}" name="jnlp.file.resolved"/> <echo>javaws "${jnlp.file.resolved}"</echo> </target>
据我所知,修复是:'将以下内容添加到自定义的 junit 宏定义中:'
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<customize/>
问题是我不知道那在哪里,也没有以任何方式修改过我的 ant 文件...谁能给我更多信息?我假设修复程序位于 jnlp-impl.xml 文件中的某个位置;我只是不知道该放在哪里。
编辑更新:在 jnlp-impl.xml 文件中添加了所有引用“copylibs”的部分-
<target name="-test-jnlp-type" depends="-test-jnlp-enabled" if="is.jnlp.enabled">
<condition property="is.applet">
<equals arg1="${jnlp.descriptor}" arg2="applet" trim="true"/>
</condition>
<condition property="is.application">
<equals arg1="${jnlp.descriptor}" arg2="application" trim="true"/>
</condition>
<condition property="is.component">
<equals arg1="${jnlp.descriptor}" arg2="component" trim="true"/>
</condition>
<condition property="is.applet+mkdist.available">
<and>
<isset property="libs.CopyLibs.classpath"/>
<istrue value="${is.applet}"/>
</and>
</condition>
<condition property="is.application+mkdist.available">
<and>
<isset property="libs.CopyLibs.classpath"/>
<istrue value="${is.application}"/>
</and>
</condition>
<condition property="is.component+mkdist.available">
<and>
<isset property="libs.CopyLibs.classpath"/>
<istrue value="${is.component}"/>
</and>
</condition>
</target>
......
<target name="-do-jar-jnlp-application" depends="-init-filename,-test-jnlp-type,-init-macrodef-copylibs" if="is.application+mkdist.available">
<j2seproject3:copylibs manifest="${tmp.manifest.file}">
<customize>
<attribute name="Main-Class" value="${main.class}"/>
</customize>
</j2seproject3:copylibs>
<echo>To run this application from the command line without Ant, try:</echo>
<property location="${jnlp.dest.dir}/${jnlp.file}" name="jnlp.file.resolved"/>
<echo>javaws "${jnlp.file.resolved}"</echo>
</target>
<target name="-do-jar-jnlp-component" depends="-test-jnlp-type,-init-macrodef-copylibs" if="is.component+mkdist.available">
<j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
</target>
提前致谢。
【问题讨论】: