Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

java not finding the class in a jar

Posted on 2006-07-24
2
Medium Priority
?
294 Views
Last Modified: 2013-11-24
Hi,
  I am trying to run  a java class  which is using commons-httpclient-2.0.2.jar  which is in /var/tomcat/shared/lib, my CLASSPATH variable is pointing to /var/tomcat/shared/lib but when i try to run it it gives me error :
  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpMethod.

Please Help,
Thanks,
-A
0
Comment
Question by:amit81sharma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 17169650
The methodology recommended is to put it in the lib directory of your webapp
0
 
LVL 14

Accepted Solution

by:
StillUnAware earned 750 total points
ID: 17169658
the CLASSPATH must include the jar itself like:

/var/tomcat/shared/lib/commons-httpclient-2.0.2.jar
0

Featured Post

Google Certified Professional - Cloud Architect

This course (1 of 3) is designed to help students who are interested in Google Cloud Platform (GCP) to become familiar with the platform, navigate the console and learn its capabilities. It will also prepare students for the Google Cloud Architect certification exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question