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:
- [Solved] java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id “null”
- [Solved] Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2
- Automatic version change of IntelliJ idea language level and Java compiler
- [Solved] Syntax error, parameterized types are only available if source level is 1.5
- How to Solve JAVA @override error
- An error is reported after eclipse changes the JDK version
- JAVA: How to Solve @override error
- [IDEA] Maven Run Project Error: Diamond operator is not supported in – source 1.5″
- @Override must override a superclass method problem solving
- [Solved] Springboot Project mybatis Error: Invalid bound statement (not found)