Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse::Indirectly referenced from required .class files

Tags:

java

eclipse

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

like image 809
user972418 Avatar asked Apr 24 '15 13:04

user972418


2 Answers

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?

like image 142
Josh Davis Avatar answered Oct 12 '22 17:10

Josh Davis


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.

like image 38
Shayan Ghosh Avatar answered Oct 12 '22 18:10

Shayan Ghosh