• 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

incorportating 3rd party libraries

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.

What I am trying to find/work out is what is the normal procedure/standard practice to incorporate a class library, from Jakarta for instace, into my application.


I am looking at a Java class library that I want to incorporate into my application, it is an FTP lib, reading the docs it seems to do everything I require.

But, I am falling over, I am a newbie, on how to get this class lib into my app project. I am using Eclipse but it is the theories that I am having a problem with.

Along with the class lib download is an Ant build file. Now can I run this Ant file to alter the package declarations in the classes, to be to where they now reside in my app structure or??? What is the purpose of the Ant build file if this is not what it does.. sorry dumb question but I have read through Ant docs and if I understood what Maker did I would understand what Ant did, but I have never heard of Maker: I am a newbie :-(

Other than the Ant file can I not just import classes to my local app structure but this would mean altering all the package declarations by hand, or with a find and replace in some program, eclipse does not seem to do a global replace: I may be wrong but I can't find it.


Thanks for taking the time to read.
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go to www.java.sun.com to find out how to add a .jar file to your class path or maybe the Eclipe help will tell you. Then, you just need to write an import statement at the top of the class you are writing that will use the .jar file. Your project's package structure and names are not supposed to match those of the external library you are trying to use. You should just use the .jar file as is without messing with Ant at all.

 
Martin Thorpe
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent Anthony thanks, I could not see the wood for looking at the trees... or the other way round, can't remember.

Any way thanks as always now seems so obvious.

cheers
Martin
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic