build.xml代码
<path id="floggy.classpath">
<fileset dir="${floggy.path}/lib" includes="*.jar"/>
</path>
<target name="post-compile">
<taskdef
name="floggy-persistence-weaver"
classname="net.sourceforge.floggy.persistence.WeaverTask"
classpathref="floggy.classpath"/>
<floggy-persistence-weaver
bootclasspath="${platform.bootclasspath}"
classpath="${libs.classpath}"
input="${build.classes.dir}"
output="${build.classes.dir}"/>
</target>
hello.HelloMIDlet /home/ubuntu/NetBeansProjects/FloggyExample/build.xml:101: net.sourceforge.floggy.persistence.WeaverException:hello.HelloMIDlet 在net.sourceforge.floggy.persistence.Weaver.execute(Weaver.java:350) at net.sourceforge.floggy.persistence.WeaverTask.execute(WeaverTask.java:90) 在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor244.invoke(未知来源) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:601) 在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) 在org.apache.tools.ant.Target.execute(Target.java:392) 在org.apache.tools.ant.Target.performTasks(Target.java:413) 在org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) 在org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 在org.apache.tools.ant.Project.executeTargets(Project.java:1251) 在org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:285) 在org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) 在org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153) 引起:javassist.NotFoundException:hello.HelloMIDlet at net.sourceforge.floggy.persistence.Weaver.buildFloggyFieldType(Weaver.java:927) at net.sourceforge.floggy.persistence.Weaver.createPersistableMetadata(Weaver.java:198) at net.sourceforge.floggy.persistence.Weaver.buildClassTree(Weaver.java:873) at net.sourceforge.floggy.persistence.Weaver.getClassThatImplementsPersistable(Weaver.java:1287) 在net.sourceforge.floggy.persistence.Weaver.execute(Weaver.java:278) ......还有16个
答案 0 :(得分:0)
您需要设置默认MIDlet(在Netbeans中单击右侧项目并选择属性 - &gt;在左侧面板中选择Application Descriptor,从标题中选择MIDlet并添加您的MIDlet类。