Search code examples
javaeclipsejartalend

Talend tJava customCode "cannot be resolved to a type" with tLibraryLoad


I am trying to follow this tutorial with my own jar file :

package

TSVTransposer is the main if this matters in some way.

I exported this package using the eclipse exporter as a jar file.

This is my Job in Talend :

Job

This is my code in the tJava : TjavaCode

With InputFile being one of my own Java class.

And this is my tLibraryLoad :

tLibraryLoad

When I try to run the job, I get this error :

error

As if my jar hadn't been imported at all.

Thanks for reading this far!


Solution

  • In Advanced settings of the tJavaRow component, add

    import my.package.path.to.tsvTranspositer.*;
    

    This will be added to the generated Java code and make your class available to the job.