Solved

java not finding the class in a jar

Posted on 2006-07-24
2
252 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
2 Comments
 
LVL 86

Expert Comment

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

Accepted Solution

by:
StillUnAware earned 250 total points
Comment Utility
the CLASSPATH must include the jar itself like:

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now