wood burning stoves
The moose likes Java in General and the fly likes how to set up classpath in windowsXP for POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to set up classpath in windowsXP for POI" Watch "how to set up classpath in windowsXP for POI" New topic

how to set up classpath in windowsXP for POI

shukla raghav
Ranch Hand

Joined: Aug 03, 2008
Posts: 203
I have written a program that reads MS excel file and captures cell data. I have used the POI api by apache. I loaded the necessary jars from the FTP mirror site : ftp://mirror.nyi.net/apache/poi/dev/. I am using Netbeans IDE. I added all the jars in my Project in Netbeans but still it does not recognize POI class names. I am using Windows XP. I DONT KNOW WHY IS IT HAPPENING. How should i set the class path. when i surfed the apache site this is what they tell to do. But I could not understand what they mean by this

The HSSF application is nothing more than a test for the high level API (and indirectly the low level support). The main body of its code is repeated above. To run it:

download the poi-alpha build and untar it (tar xvzf tarball.tar.gz)
set up your classpath as follows: export HSSFDIR={wherever you put HSSF's jar files} export LOG4JDIR={wherever you put LOG4J's jar files} export CLASSPATH=$CLASSPATH:$HSSFDIR/hssf.jar:$HSSFDIR/poi-poifs.jar:$HSSFDIR/poi-util.jar:$LOG4JDIR/jog4j.jar
type: java org.apache.poi.hssf.dev.HSSF ~/myxls.xls write

This should generate a test sheet in your home directory called "myxls.xls".

Type: java org.apache.poi.hssf.dev.HSSF ~/input.xls output.xls

This is the read/write/modify test. It reads in the spreadsheet, modifies a cell, and writes it back out. Failing this test is not necessarily a bad thing. If HSSF tries to modify a non-existant sheet then this will most likely fail. No big deal.

Please tell me in laymen terms what to do exacly
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10824

IDE specific.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link: http://aspose.com/file-tools
subject: how to set up classpath in windowsXP for POI
It's not a secret anymore!