This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
Joined: May 25, 2004
Excellent Anthony thanks, I could not see the wood for looking at the trees... or the other way round, can't remember.