Loading Java library to validate email addresses - 6.5

Talendジョブスクリプトリファレンス

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
task
ジョブデザインと開発 > ジョブデザイン
EnrichPlatform
Talend CommandLine
Talend Studio

The Java code defined in the first tJavaRow component requires a Java library to be loaded before it can work. Follow the procedure below to add and configure a tLibraryLoad component to load that Java library and import the relevant classes at the time of Job execution.

Procedure

  1. Next to the second tJavaRow component, add a new component, tLibraryLoad.
    addComponent {
    	setComponentDefinition {
    		TYPE: "tLibraryLoad",
    		NAME: "tLibraryLoad_1",
    		POSITION: 256, 64
    	}
    
    }
  2. Next to the setComponentDefinition {} function, use the setSettings {} function to load the Java library and import the needed classes.
    	setSettings {
    		LIBRARY : "\"jakarta-oro-2.0.8.jar\"",
    		IMPORT : "import org.apache.oro.text.regex.Perl5Matcher;
    import org.apache.oro.text.regex.Perl5Compiler;
    import org.apache.oro.text.regex.Pattern;"
    	}