File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Adding external JARs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Adding external JARs" Watch "Adding external JARs" New topic
Author

Adding external JARs

Paras Ahuja
Ranch Hand

Joined: May 22, 2012
Posts: 62
Hi everyone,
I know how to add external JAR files in Eclipse. But what if i want to run the program using cmd?
How should i add external JAR files (in my case, Apache POI JAR files) so that JVM detects it and does not show error.
Please help...
Thanks in advance..
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19060
    
  40

Paras Ahuja wrote:Hi everyone,
I know how to add external JAR files in Eclipse. But what if i want to run the program using cmd?
How should i add external JAR files (in my case, Apache POI JAR files) so that JVM detects it and does not show error.
Please help...
Thanks in advance..


Jar files needed by the JVM (and even by the compiler) should be specified as part of the classpath.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
Don't get me started about those stupid light bulbs.
 
subject: Adding external JARs