JDeveloper and ADF
Where to put the jxl library jar file?
To the experienced: In my work I need to read from Microsoft Excel .xls files, which I never did before. Searching on the web I found and downloaded the jxl library (jxl-2.6.3.jar from http://www.findjar.com/jar/net.sourceforge.jexcelapi/jars/jxl-2.6.3.jar.html) and tried to use it in JDeveloper 220.127.116.11. I put that jar file c:\oracle\middleware\jdeveloper\lib, and in the test java class file used import jxl.*; But JDeveloper does not find the library. I then put the jar file also in ...\jdeveloper\ide\lib, ...\jdeveloper\jdev\lib, which did not work out either. So if anybody know this is done, could you please let me know? Also, I am not sure if jxl is good. I also see on the web that some people use Apache org.apache.poi. Which is better? I need to read files containing many columns and thousands of rows. Thank you very much for your help! Newman
Copy the jar file to any directory. Include the JAR file in the classpath in Project Properties > Libraries and Classpath.
Hi, as Deepak says - create some folder outside of your project folders to use your independent libraries/jar-s in many projects (e.g. d:\javalibs) and store your jars there like e.g. Apache POI would be d:\javalibs\poi\file1.jar..fileX.jar - this way you can organize your independent libs. then in your project create new library and > browse > add all jars according to Deepak's suggestion. I have experience with Apache POI mainly with creating new very complex .xls .doc documents as reports so I guess It is good for reading .xls .doc as well - it has a very rich API and it is well documented. I cannot compare with jxl since I never used it. regards, Brano Edited by: Branislav Nemec on Apr 14, 2011 12:12 PM
Hi, dvohra16, Great! Your answer to my question effectively solved my problem. That saved me a lot of time fumbling. Thank you very much for your help! Branislav, Thank you very much and I do appreciate your thoughtful advice on organizing the independent library. I have tried the jxl library and reading from a test .xls file was successful. But I will also try the POI library. When searching on the web, it does appear more search results are about POI. Best regards, Newman