• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Issue with adding Jar files

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have been trying to add the 'org.apache.poi' jar files to run a program to convert excel files to csv files. I read up on some articles and downloaded 'poi-bin-3.9-20121203.zip' and extracted it to C:\. I added the individual jar files to my ClassPath and tried running the program. I keep getting the error 'org.apache.poi.hssf.usermodel' does not exist. Could anyone please help me in understanding how to extract and add the jar files porperly? I am not using any IDEs and am running javac from my Windows command prompt.

Thanks in advance,
Benoy
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should the classpath flag in javac

javac -cp c:\poi.jar YourJava.java

Then try running it also need to specify classpath

java -cp c:\poi.jar YourClass

Then for jar creation

jar cfm YourJarName.jar YourClass.class poi.jar manifest.txt

In the manifest text specify the main class.


 
Benoy John
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tsang. Worked perfectly.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic