Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to tell ant that some packages are needed?

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the sequence of this post i'm trying to create a jar without and with ant, using the unjared needed classes.

so, i end up with org, net, javax and com packages i need to tell ant they exist and belong to classpath. How to do it? i tried refering to it using dirset but didnt work;

in previous post i had all jars inside a lib folder and used fileset, but here i'm totally helpless.

the only way i'm getting results is puting those packages inside bin dir, but when i compile again they get erased... ; i also tried copying them again through an ant task, but ant told me could not copy them

can someone pls help me?

TiA
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess i've a partial eureka
here's my script:

here's what i did:
added those unjared needed jars to src folder
made ant jar and got (finally) an executable jar from ant

i tried later to return to my original settings, using jars, but when i opened my final jar (with zip) those jars were not unjared so app coudnt find the classes

one mistake was not having:
basedir="${targetdir}" - i was using �{basedir} instead

now my prob is how to unjar using ant: i tried inside jar tag but ant complained...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic