How to use Java classes in Talend

后端 未结 2 1094
孤城傲影
孤城傲影 2020-12-18 13:56

I have the following three classes : I tried making the routine of 1 & 2 and used tjava to call the main class and the method from 1 & 2 but I am unable to f

相关标签:
2条回答
  • 2020-12-18 13:58

    Firstly, routines classes in Talend need to be in routines package

    package routines;
    
    public class PageScraper {
    
        public void Scrape() {
            System.out.println("PageScraper.Scrape");
    
        }
    }
    

    Secondly, to use it in Job you need to drag'n'drop routine to opened job area.

    Then you can use your class in that way

    0 讨论(0)
  • 2020-12-18 14:07

    You can easily make a jar file that contains the three classes then load the jar using tLibraryLoad or include the jar in your routine if you want to get more reusability.

    0 讨论(0)
提交回复
热议问题