Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
PascalS
New Member
New Member

The import org.apache.commons cannot be resolved

Hello,

i am trying to use FileUtils.

I put the line "import org.apache.commons.io.FileUtils; " in my tJavaRow component under Advanced settings.

But i get the error messages:
The import org.apache.commons cannot be resolved
or
FileUtils cannot be resolved

Labels (2)
1 Solution

Accepted Solutions
Xiaodi_Shi
Support
Support

Hello,

If you want your job to have access to the external library, please use a tLibraryLoad component to load external jar file before you use it.
tLibraryLoad
|
onsubjobok
|
tJavaRow

In addition to that, if you need to use these same code many time in different job, we would suggest you to create a routine and import external library one time in repository metadata, and call the routine in the job.

Please refer to this documentation to learn how to create a routine and call it in a job.

https://help.talend.com/en-US/studio-user-guide/8.0-R2024-06/creating-custom-routine-jars

Best regards

Sabrina

View solution in original post

1 Reply
Xiaodi_Shi
Support
Support

Hello,

If you want your job to have access to the external library, please use a tLibraryLoad component to load external jar file before you use it.
tLibraryLoad
|
onsubjobok
|
tJavaRow

In addition to that, if you need to use these same code many time in different job, we would suggest you to create a routine and import external library one time in repository metadata, and call the routine in the job.

Please refer to this documentation to learn how to create a routine and call it in a job.

https://help.talend.com/en-US/studio-user-guide/8.0-R2024-06/creating-custom-routine-jars

Best regards

Sabrina