Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Adding JAR Files to my Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Adding JAR Files to my Classpath" Watch "Adding JAR Files to my Classpath" New topic
Author

Adding JAR Files to my Classpath

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Hi,

I want to add a few jar files to my class path. Can somebody tell me how to do it and how do people working in a company usually do this?/ I am not using Eclipse or any other IDE. I have my Java path set up in the environmaental variable 'PATH' in My Computer Properties.

Thanks.


Be Humble... Be Nice.
Seth Anshul
Greenhorn

Joined: May 02, 2006
Posts: 16
Just add the absolute location of your jar file to the CLASSPATH.
That would do

Asset
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

See How To Set The Classpath in the JavaRanch FAQ.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding JAR Files to my Classpath
 
Similar Threads
How to enumerate jar files and the classes in them?
Building JAR
Java Comm API... Please respond
Trying to call Jasper iReport through portlet & getting error
Updating jar file