Hello Anand,
Once you upload your Jar files in the PI server, then you can use the same in your UDF. It is similar to the Custom adapter module files, once you upload them in your PI server, you can use the JNDI of the module in your channels.
Similarly in your case, once you upload the Jar files, you can use the library in your UDF.
Regards,
Nitin