Tuesday, April 27, 2010

The method split(String) is undefined for the type String

Programmer Question

I am using Pulse - the Plugin Manager for Eclipse and installed. I have the Eclipse 3.5 for mobile development(Pulsar) profile with a couple other profiles.



I realized that the split() method called on a string from code such as below:



String data = "one, two, three, four";
data.split(",");


generates the error: "The method split(String) is undefined for the type String". I am aware that the split() method did not exist before Java's JRE 1.4 and perhaps could be the cause of the problem.
The problem is I don't think I have jre/sdk versions installed. Perhaps there's one in-built with the Pulsar profile and needs editing - but I couldn't tell what settings (and where) needs tweaking. I have checked Windows>Preferences>Java>Installed JREs and it's set to >= jre1.4. Please help thanks.



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails