4

I am using java.util.TreeSet Class in my project. It compiles perfectly with JDK7, but when i am using JDK8 to compile the program. It is showing compile time error.

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

Is it some encoding issue or something else? how can i resolve this?

Ankit Sharma
  • 1,569
  • 3
  • 19
  • 31
  • The only times I get errors similar to this are when I accidentally remove the JRE System Library from my build path in Eclipse. I remember someone else having a similar issue on here, but I can't remember the solution... – awksp May 23 '14 at 09:09
  • @OlegEstekhin I am using glassfish that might be using compiler internally. so shd i update it? – Ankit Sharma May 23 '14 at 11:03
  • No harm in at least trying the latest GlassFish version. A question about [using lambdas in GF4](http://stackoverflow.com/questions/13139794/glassfish-server-does-not-work-with-jdk-8) provides some answers and can be relevant to you too. – Oleg Estekhin May 23 '14 at 11:15
  • Glassfish up-gradation solve my problem. – Ankit Sharma May 26 '14 at 10:10
  • If you solved your problem, please post your solution as an answer and accept it. – Jeffrey Bosboom Jun 17 '14 at 02:08

3 Answers3

1

I have updated my glassfish application server and it has been solved my problem.

Ankit Sharma
  • 1,569
  • 3
  • 19
  • 31
  • Be careful of Myeclipse Tomcat server . So just download the version of `Tomcat` that support `JDK 8`, it will be fixed. **newly updated Tomcat 6/7/8** already fixed this problem~, [tomcat.apache.org](http://tomcat.apache.org/) . Thanks a lot :) – isaacselement Nov 18 '14 at 05:27
1

I've met this using Tomcat 7.0. I solved it by upgrading Tomcat to 8.0 or replacing the ect.jar to the latest one.

Sky
  • 7,343
  • 8
  • 31
  • 42
0

@Sky provided the only suggestion that worked for me - in tomcat/lib replace ecj-x.jar with the newer version.

Sandra
  • 58
  • 6