Sajjad Abdullah
Sajjad Abdullah

Reputation: 47

The type java.lang.CharSequence cannot be resolved

Error: The type java.lang.CharSequence cannot be resolved.

I am creating a dynamic web project by specifying the WSDL url of web service. It downloads the web service classes. But it does not build due to the above mentioned error.

I am using Eclipse Java EE 3.7 Indigo with JRE 1.8.

Also there are errors in the java files of the web service. An interface has been used several times in several java files but not present in the package folders provided by the web service.

Any Help?

Upvotes: 0

Views: 6367

Answers (1)

Jmini
Jmini

Reputation: 9497

First of all, I did not manage to start an Indigo Eclipse (eclipse-SDK-3.7.2) with a Java 8 JVM, it fails at startup.

To check the Java Version your Eclipse is using, you can check:

Menu > Help > About Eclipse. In the Dialog, click on the Installation Details Button and switch to the Configuration Tab. You will find a line:

java.version=1.7.0_45

If you want an Eclipse IDE that can be started with Java 8, you should switch to Luna.


Now the JVM you use to run Eclipse is not automatically the one used by your project.

You can install additional JVM in the preferences: Java > Installed JREs

Installed JREs

In this example 2 JVM are available: jre6 and jre8.


A related concept is “Execution Environment”. Each Java project of your workspace is configured to work with a specific Java Environment. I have described in this answer how to ensure that Java 8 is correctly set (Execution Environment in the prefrences and in the Java Version used by the project).

The available JVMs are mapped to the Execution Environment in the preference page:

Java > Installed JREs > Execution Environment

Execution Environment - Eclipse Indigo

By the way, in this page, you see that Java-SE-1.8 is not supported by Eclipse Indigo.


If your requirement is to use Eclipse Indigo, in my opinion you should stick to Java 1.7 or smaller.

Upvotes: 3

Related Questions