Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Charlie Miller   on Jul 14 In Java Category.

  
Question Answered By: Willard Washington   on Jul 14

I found the answer.

(in my solution I added some jar  files that my project  depend on them in
MANIFEST section,is it the right solution?)

<target name="jar" >
<mkdir dir="${gmail.build.jar}"/>
<jar destfile="${gmail.build.jar}/GmailFetcher.jar"
basedir="${gmail.output.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="lib/swingx.jar
lib/substance.jar lib/swing-worker.jar lib/forms_rt.jar lib/SwingZX.jar
lib/mail-1.4.2-20081209.230559-10.jar lib/activation-1.1.jar
lib/mysql-connector-java-5.1.6-bin.jar lib/jdynamite.jar
lib/gnu-regexp-1.0.8.jar"/>
</manifest>
</jar>


<copy todir="${gmail.build.jar}">
<fileset dir="${basedir}">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>

<mkdir dir="${gmail.build.jar}/lib"/>
<copy todir="${gmail.build.jar}/lib">
<fileset dir="${basedir}/lib">
<patternset refid="library.patterns"/>
<type type="file"/>
</fileset>
</copy>
</target>

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on java.lang.NoClassDefFoundError Or get search suggestion and latest updates.


Tagged: