One Star

Problem with String.isEmpty()

Hello. I was following the tutorials ( http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=9#step135 ), and, after save the job, when I run the job, it does not start to run, and a window titled "Find Errors in Jobs" says that "the method isEmpty() is not defined for String type".
So I replaced that method for !state.LabelState.equals("") and then works...
¿Is that normal?
Regards.
5 REPLIES
Seventeen Stars

Re: Problem with String.isEmpty()

hi,
which java version have you got ?
this method isEmpty is available since 1.6 .
regards
laurent
One Star

Re: Problem with String.isEmpty()

Hi.
My java version is java version "1.5.0_22", according to this: http://talendforge.org/wiki/doku.php?id=doc:java_windows
I suppose if I upgrade my JRE to 1.6 nothing bad will happen.
Thanks.
One Star

Re: Problem with String.isEmpty()

Agree with that.
Seventeen Stars

Re: Problem with String.isEmpty()

hi,
fortunatly "nothing bad" will happen Smiley Happy
Don't forget to verify version use by talend (=> preferences)
Never mind you 've found a "right" solution to run the Talend 's tutorial on java 5.
@talend team : could you make an update on that tutorial and specify the java version needed ?
regards
laurent
Community Manager

Re: Problem with String.isEmpty()

Thanks for reporting this issue.
We've updated the tutorials with a prerequisite information related to the java version.
Thanks again for your help.
Elisa