Results 1 to 4 of 4
  1. #1
    xhane is offline Member
    Join Date
    Jan 2009
    Rep Power

    Default importing other classes or using a Jar

    I wrote a program that uses the apache poi functionality. i extracted and compiled all the files that are included in their source package. it all works but I am wondering if there is a better way.

    When I do it this way there are about 1000 class files that end up getting compiled and ultimately distributed. I tried downloading the bin file from apache and it contains a handful of jar files but I have no idea how to use them. I tried everything I could think of.

    currently it looks like this:
    import org.apache.poi.hssf.usermodel.*;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;

    and then all the compiled class files are in matching directories.

    Is there a way to point everything at the Jar file apache distributes and delete the huge amount of files and directories? Unfortunately I can't seem to search on Jar on the forum because it only has 4 letters.

    Thanks in advance.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    Include the jarfiles on your classpath.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    Masijade is right. In addition, unbundling their JAR files and including select classes probably violates their license.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power

Similar Threads

  1. Importing documents
    By stefanybaez in forum Advanced Java
    Replies: 2
    Last Post: 12-22-2008, 08:24 PM
  2. Need help with importing classes
    By Deathmonger in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 11:03 AM
  3. Importing package
    By bugger in forum New To Java
    Replies: 5
    Last Post: 11-26-2007, 01:29 PM
  4. Importing classes
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-06-2007, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts