Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Eclipse not knowing about included file


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Jarwulf   Members   -  Reputation: 222

Like
0Likes
Like

Posted 09 November 2012 - 07:26 PM

Hi I have a problem trying to include a file in Java and eclipse not seeming to recognize it.

I have

import org.apache.commons.httpclient.HttpClient;

and

HttpClient client = new HttpClient();

when it gets to the second line I get the crash


Exception in thread "Thread-4" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66)

when I click it tells me that the source attachement does not have HttpClient.class is not found even though I unzipped the jar file referenced and clearly saw it in the directory \org\apache\commons\httpclient. I tried replacing the jar to no avail.

I then took the org folder put it in the src directory of my project workspace and used add library to add it right to the list in the package explorer pane but I reran it and it still cannot seem to recognize that the file it wants is included. What is happening? Thanks

Sponsor:

#2 Bubsy   Members   -  Reputation: 407

Like
1Likes
Like

Posted 09 November 2012 - 07:37 PM

It's not the org.apache.commons.httpclient.HttpClient that is missing but the org.apache.commons.logging.LogFactory class (which is part of the Apache's common-logging library).

You must add the common-logging library's jar (and its dependencies, if there's any) to your project's classpath.

#3 incertia   Crossbones+   -  Reputation: 779

Like
0Likes
Like

Posted 11 November 2012 - 01:30 PM

Just import org.apache.commons.logging.LogFactory and that might fix your problem.
what




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS