Hello folks,
I've developed a small project under Eclipse and I had no problem at all when it comes to declaring packages and using their classes. More specifically, I'm using Apache POI to handle Excel files, and I use the following line of code:
InputStream input = ExcelPOI.class.getResourceAsStream( "Arquivo Status UBB.xls" );
As I told before, the problem runs smoothly, but when I try to run it under Netbeans, adding exactly the same packages, this
IDE does not manage to find the class "ExcelPOI" on the line above. I'm literally copying and pasting my code over to Netbeans, with all the package declarations, and only that class can't be found, though I'm unable to proceed.
My list of imports that works in Eclipse and does not work in Netbeans is:
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.POITextExtractor;
import org.apache.poi.POIDocument;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFRow;
Hovering the mouse over the
word ExcelPOI on that line above in Eclipse, it indicates "servlets.ExcelPOI", and that is an import I didn't need in Eclipse and is impossible to perform in Netbeans.
Does anyone have ideas on how to proceed to resolve that? I need to go on with Netbeans...
One possible important thing to mention is that in Eclipse I added the file "Arquivo Status UBB.xls" into the package that contains my
servlet. Doing the same thing in Netbeans is of no use at all.
To wrap up, all the Apache POI libs used in Eclipse are already imported into Netbeans (only "poi-3.7-20101029.jar" was necessary in Eclipse), whereas that one and lots more from Apache POI were unable to make "ExcelPOI" available for me in Netbeans.
Thanks and regards!