The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class

The error prompt “the type Java. Lang. charsequence cannot be resolved” appears in the JSP code. From the prompt information, we can see where the problem is caused by the wrong configuration or incompatible software version

The development environment and configuration are as follows:
win7 64bit
JDK 1.8
MyEclipse version: Version: 8.6.1, build ID: 8.6.1-20101117

Later, it was found on stack overflow that the compiler version supported by ide itself does not match the JRE version. Reference address:
http://stackoverflow.com/questions/24301986/the-type-java-lang-charsequence-cannot-be-resolved-in-package-declaration

The solutions are as follows:
first solution is to rollback to JDK 7, then you will use old charsequence interface without default methods. Second solution is to set source level of your project to 1.8, then your compiler will not compress about default methods in interfaces

Windows -> In preference, select the lower version of the installed jres and click OK to save the settings. Re open the previous error JSP file, found no error

Similar Posts: