How to map metadata fields from CustomjavaComponent?

I have a custom java code and am using the CustomJavaComponent in my graph. The output of the java program I want to map to output metadata fields.
Can anybody help on this as soon as possible.

Hi Raj,

I would recommend using the template code that is presented in each CustomJava component. You should be able to access this by clicking on the Algorithm property where a dialog box will pop up with the Java code, you can also read more about this in our documentation here. The code you will need is commented (Writing records to output port 0). If you are having trouble with this, another option would be to use Reformat component write the CTL code you need and then click on Convert to Java.

Hello,

Thanks for the info. I could able to do the mapping to metadata.

Thanks,
Raj