I am getting the following error after importing Java project (Non Maven) in Eclipse:
The type java.lang.Enum cannot be resolved. It is indirectly referenced from required .class files
I have couple of Java classes in my project and I am getting this compilation error in the first line of this below class (In the package declaration line)
package com.test.utils;
public enum Currency {
PENNY, NICKLE, DIME, QUARTER
};
I checked my project's Java Build Path and in the Libraries tab all the jars and JRE System Library are present. Below is the .classpath content
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/***.jar"/>
<!-- list of jars -->
<classpathentry kind="output" path="bin"/>
</classpath>
I am using eclipse JUNO
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
and Java version is jdk 1.6.0_29 and the Compiler compliance level is 1.6 in eclipse.
I tried the following to resolve this issue
But none of the above worked.
Please tell me how can I get rid of this compilation error.
I had the same issue and I just restarted my IDE and it worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With