• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is this the correct way to compile code that uses classes in another jar file

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<property name="source" value="."/>
<property name="lib" value="${source}/lib"/>
<property name="build" value="${source}/build"/>
<property name="config" value="${source}/config"/>
<property name="client" value="${source}/client"/>

<target name="compile">
<mkdir dir="${build}"/>
<mkdir dir="${client}"/>
<javac srcdir="${source}" destdir="${build}" includes="*.java">
<classpath>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>

I have my jar under the ./lib directory and
<echo>
${lib}
</echo>

outputs ./lib

Thanks for any help

Tony
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's an excerpt from a real-world project:



I hope it's not too confusing - I ripped it out of a very large project, so there may be some strange references left in there.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic