8

I meet each day dozens of similar questions where people claim about java.lang.ClassNotFoundException in java.

Just recent examples:

java.lang.ClassNotFoundException:org.apache.tika.sax.BodyContentHandler

https://stackoverflow.com/questions/42273799/classnotfoundexception-in-httpclient-api

In most cases it looks like that people have deep misunderstanding of principles about linking libraries, building and running jars with classpath.

I consider all such questions as duplicates, but I'm not sure which question should be considered as "mother" question in this case. I've thought it is What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException?

but I'm not sure on 100%. There is also How do I resolve this Java Class not found exception? question, but it is also has quite pure explaining of steps for solving this problem.

I believe we need something like this question: What is a NullPointerException, and how do I fix it? for ClassNotFoundException case.

So, I'm looking for authoritative community advice, what question use for such cases for closing them as duplicates?

UPD: I've also created https://stackoverflow.com/questions/42274603/program-works-from-ide-but-when-running-it-outside-ide-i-receive-classnotfound question for this purpose.

6
  • If a question already exists, why do we need another one? If you want to provide information that's not already there, add another answer to the question; if you want to highlight a particular answer when marking it duplicate, add a comment. Feb 16, 2017 at 13:07
  • Existent questions are very broad, I'm suggesting more typical and practical case
    – Andremoniy
    Feb 16, 2017 at 13:08
  • Also, @AndyTurner, it is not constructive approach. I've asked here very clear question: which question use as canonical. I'm not obliged to create canonical answer in case if I can not find it.
    – Andremoniy
    Feb 16, 2017 at 13:12
  • "I've also created ... question for this purpose" is what I was specifically saying was unnecessary. I see that you've now deleted it, so... Feb 16, 2017 at 13:13
  • Ok, but you have downvoted this particular meta question (haven't you?). Was is the reason? I asked incorrect question here about canonical question? Or what?
    – Andremoniy
    Feb 16, 2017 at 13:22
  • I considered your proposal to create another question not to be useful. You've now removed it, so, downvote removed. Feb 16, 2017 at 13:25

0

You must log in to answer this question.

Browse other questions tagged .