我从7.0.1更新到Netbeans 8.0.1,如果'Web Start'被禁用,我的java程序编译得很好。只要 'Web Start的' 启用我收到以下错误:Netbeans蚂蚁生成错误'不支持的元素定制'
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/>
麻烦是我不知道那里是什么,也没有以任何方式修改我的蚂蚁文件...任何人都可以给我多一点信息?我假定修补程序在jnlp-impl.xml文件中的某处;我只是不知道该把它放在哪里。
编辑更新:增加所有部分与引用 'copylibs' 在JNLP-impl.xml中的文件 -
<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>
在此先感谢。
嗨manouti,对不起,是一个痛苦..有用于copylibs没有macrodef。我已将nlp-impl.xml中copylibs的所有引用添加到原始问题中。我是否需要将其添加到文件中? – Robbie62 2014-11-19 05:55:47
@ Robbie62肯定在某处存在'copylibs'的定义。它可能位于由'jnlp-impl.xml'导入的另一个Ant构建文件中吗? – manouti 2014-11-19 17:36:08
嗨manouti,是的,还有另一个我完全忘记了的构建文件。我目前正在进行Google Startup挑战,因此直到几天后我才能够回到它。 – Robbie62 2014-11-23 04:16:51