user972418
user972418

Reputation: 827

Eclipse::Indirectly referenced from required .class files

I am facing a weird issue. When I add some external JARs to the classpath I get the error "It is indirectly referenced from required .class files". But when I remove all of them I get rid of this error. Here re the entries for .classpath

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="bundle/src/main/java"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="C:/external_jars/cq-wcm-api-5.7.8.jar"/>
    <classpathentry kind="lib" path="C:/external_jars/cq-wcm-commons-5.7.8.jar"/>
    <classpathentry kind="lib" path="C:/external_jars/cq-wcm-core-5.7.116.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Do let me know if I need to provide any other info.

Thanks in advance

Upvotes: 8

Views: 44051

Answers (3)

Mutaealim
Mutaealim

Reputation: 137

For me, after changing a dependency in pom.xml file,this kind of error started showing up.Maven repository was corrupted.So deleted the.m2 repository and updated maven.Refered this answer:

https://stackoverflow.com/a/46582952/10082325

Upvotes: 0

Shayan Ghosh
Shayan Ghosh

Reputation: 892

one of the class that you use needs another class which is not in classpath.Just add the required jar to the classpath.Also clean the workspace.Missing file's name will be in the error message.

Upvotes: 1

Josh Davis
Josh Davis

Reputation: 1893

That error means you have some unresolved dependency, i.e. one of those jar files depends on some other jar file that you have not added to your classpath.

I believe this is a duplicate of: Eclipse error: indirectly referenced from required .class files?

Upvotes: 6

Related Questions