Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

The type java.lang.Enum cannot be resolved - Getting error after importing Java project in Eclipse

$
0
0

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 2Build 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

  1. Clean the project & build the project
  2. Delete and reimport the project and then again did the step 1
  3. 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.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>