Jakob Braeuchi wrote:
[...]
Can one tell me the necessary modifications for the build.xml to make the produced jar file start correctly?
> hi ilias, > > you have to add a proper manifest-file to your jar. > > see http://ant.apache.org/manual/index.html > > jakob
Thank you for the link.
The current ojb-tutorials should be corrected, to produce a launchable jar-file.
I've added this one into the build.xml ant-target "jar" after "</fileset>":
<manifest>
<attribute name="Main-Class" value="${jar.mainClass}"/>
</manifest>And this one to the build.properties:
jar.mainClass=org.apache.ojb.tutorial1.Application
and finally this one into the build.xml :
<target name="run-jar" depends="jar" description="Run JAR Application">
<java jar="target/my-project.jar" fork="true">
<arg line="${application.args}"/>
<classpath refid="runtime-classpath"/>
</java>
</target>-
Error:
java.lang.NoClassDefFoundError: org/apache/ojb/broker/PersistenceBrokerFactory
at org.apache.ojb.tutorial1.Application.<init>(Unknown Source)
at org.apache.ojb.tutorial1.Application.main(Unknown Source)
...
-
I cannto go at this moment deeper into Ant and into this issue, as I'm risking to get "trapped".
Can anyone please tell me, what is wrong?
.
-- http://lazaridis.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
