There is a simple way if you don't have too many JARs. A JAR is a zip file. 
Unzip them and put them together, then pack them into one JAR. Another way is 
to use Maven plugin( just put serveral lines into pom.xml), and run "mvn 
package". 

Best Regards,
Kevin Xu

-----Original Message-----
From: Liu, Ming (Ming) [mailto:[email protected]] 
Sent: 2016年5月1日 19:00
To: [email protected]
Cc: Hans Zeller <[email protected]>
Subject: TMUDF questions, jar dependencies

Hi, all,

I was trying to write a sample TMUDF, which is using java. The UDF java code 
invoke some functions provided by other jars. At runtime, I got 'classNotFound' 
issue. The function required by the sample needs many depended jars, I still 
cannot find a way to correct put them in a single jar. I am not good at java. 
If that is required, can anyone kindly give me some real examples? I searched 
for many days 'how to put multiple jar into one jar' but cannot find a real 
useful guide yet.

And what is a typical way to use TMUDF which has some jar dependencies?

I think in the Kafka UDF example, https://github.com/esgyn/code-examples ,one 
should add jars for Kafka as well, how did you do that?

Thanks,
Ming

Reply via email to