Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Java routine: import cannot be resolved. Path looks ok (?)

Hi,
I'm trying to integrate my Job with POJO code colleagues have written. I've imported this code as an 'External Class Folder', and can see it when browsing .Java projects (screenshot JavaBrowsing_.java_Projects) and also in the Build path (screenshot Preferences_Java_BuildPath)
When I'm writing the import statement, Eclipse can find the right class (screenshot Define_Import_Stmt) but the compiler cannot resolve it (screenshot Import_Stmt_Error).
Any suggestions as to where I'm going wrong?
Thanks,
Colm.
Labels (3)
6 Replies
Anonymous
Not applicable
Author

Got a bit closer; I put the code into a Jar and imported this into Modules and that shows up in the Modules list with Status = Unused. How do I install it? (get it into an Installed state).
Thanks,
Colm.
Anonymous
Not applicable
Author

Talend and Eclipse are not quite that tightly integrated. Use a tLibraryLoad component to import the external jar in a job.
Anonymous
Not applicable
Author

Have you tried right-clicking on the NumberValidator routine in the Repository and selecting "Edit Routine Libraries"?
Anonymous
Not applicable
Author

That's it, thanks ("Edit Routine Libraries"). Found documentation (section 8.4.3 of TalendIntegrationSuite_TE_Studio_UG_41b_EN.pdf). Looks like there's no need to mess with Java build paths (for this anyway). Still thinking too much like a Java developer!
Thanks again.
Anonymous
Not applicable
Author

Just as a follow-up, it would be nice if you could add a .war file as a routine library -- that way you wouldn't need to add several jars that your code depends on (e.g. logging, 3rd party libs...)
I tried this: renamed mywar.war to mywar.zip, then tried to add mywar.zip via Edit Routine Libraries, but it looks like it doesn't work.
Has anyone succeeded using a .war as a routine library?
Anonymous
Not applicable
Author

You can always pack your own JAR with a simple zip tool. Extract all the JARs from /WEB-INF/lib (an any /WEB-INF/classes) into a common directory and zip that up. You may need to merge /META-INF/MANIFEST.MF files.