aspose file tools
The moose likes Beginning Java and the fly likes incorportating 3rd party libraries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "incorportating 3rd party libraries" Watch "incorportating 3rd party libraries" New topic

incorportating 3rd party libraries

Martin Thorpe
Ranch Hand

Joined: May 25, 2004
Posts: 45

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.
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
Go to 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

Joined: May 25, 2004
Posts: 45
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.

subject: incorportating 3rd party libraries