One Star

[resolved] Importing java.util.*

Hello,
I am trying to create a new component, I needed to use an Iterator si I added java.util.* to the imports but it doesn't seem to recognize it.
Part of my code (main part) :
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.designer.codegen.config.CodeGeneratorArgument
org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
org.talend.core.model.process.EConnectionType
java.util.*
"
%>

Iterator<String> i_<%=cid%> = resultat_<%=cid%>.iterator();


When I try to run the component it says Iterator is not recognized.
What am I missing ? Do I need to add something to the .xml ?
thanks !
1 ACCEPTED SOLUTION

Accepted Solutions
Seventeen Stars

Re: [resolved] Importing java.util.*

The imports you shows us will be used while creating the job source code.
If you say you run the component I guess you mean you run the job and gets the compilation problem.
Indeed it is from the perspective of a component not possible to add an import to the job source code. Thats because I would use full qualified java classes: for your example:
java.util.Iterator<String> ....
2 REPLIES
Seventeen Stars

Re: [resolved] Importing java.util.*

The imports you shows us will be used while creating the job source code.
If you say you run the component I guess you mean you run the job and gets the compilation problem.
Indeed it is from the perspective of a component not possible to add an import to the job source code. Thats because I would use full qualified java classes: for your example:
java.util.Iterator<String> ....
One Star

Re: [resolved] Importing java.util.*

Okay I get it and now it's working ! Thanks