Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

String cannot be resolved to a type - Java RAD

Tags:

java

rad

I've recently started developing in Java (coming from .Net). The IDE I am using is RAD 7.3.

After importing a project, which I need to do some enhancements on, I am receiving this error:

"String cannot be resolved to a type"

This applies to all variables of the String data type, as well as any methods that take string arguements. I'm very inexperienced with Java so I'm not sure how to go about fixing this. My guess is that it has something to do with the way RAD was installed, and that required libraries are missing. Again, not sure how to address that.

Any help or guidance would be much appreciated! Thank you

like image 360
tmaurst Avatar asked Oct 04 '11 17:10

tmaurst


3 Answers

My guess is you miss the JRE Runtime Library in your project. But this would cause all the java.* classes to generate this message! Can you post your code so we can see what might be the problem?

try doing :

right-click on your project. ->properites ->java Build Path ->tab Librairies

check if the JRE System Library is there.

like image 174
Cygnusx1 Avatar answered Oct 27 '22 15:10

Cygnusx1


You need to capitalize the "s" in the string.

like image 23
TheEliteAlien Avatar answered Oct 27 '22 13:10

TheEliteAlien


i am a beginner. i am using Eclipse and got stuck at the Hello World code. Got same error description and also error stating can't resolve 'system'.

After staying frustrated for few hours, as I checked JRE library path and stuff, I just Capitalized 'S' of 'string' and 'system'.. and bang.. problem solved. I hope this helps.

like image 44
Hammad Ali Zaman Avatar answered Oct 27 '22 13:10

Hammad Ali Zaman