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

    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
    Posts
    2,571
    Rep Power
    9

    Default

    Include the jarfiles on your classpath.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    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
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

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
  •