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
- Clean the project & build the project
- Delete and reimport the project and then again did the step 1
- Restart eclipse from the "File" menu and again did the step 1
But none of the above worked.
Please tell me how can I get rid of this compilation error.