Employee

Calling custom java methods in TDM

- Works fine on 6.3.1:
The java/bean usage is as follows.  Create a java class/bean within Talend Studio's Integration perspective > Code/beans. Then switch to java perspective (Package explorer) , right click on the Project/code and export as Jar. In this case, it will list some pom*.xml files within Code folder for export. Select all and then create the jar ignoring some exception/error pop-up. Then switch to  Mapping perspective , new > Database , edit class path and add the jar. Next in a Map, one can access the routine by using Java function passing the packagename and class name (for example beans.MyClass) followed by routine(and it's arguments). .This works fine in 6.3.1.

- How is this done  on 6.4.1 and higher versions ?!
We have noticed that in Studio 6.4.1, it doesn't show any option to import the jar file onto TDM class path(attached screenshot). Ideally (could be a feature request) it would have been great if we could access the bean class directly without having to import any jar files.

1 ACCEPTED SOLUTION

Accepted Solutions
Eight Stars

Re: Calling custom java methods in TDM

Hi,

 

Could you try with navigator view:

1-Open navigator view

Capture.PNG

2-Right click on your project and choose "properties"

3-Then choose mapping. You should be able to import your jar:

Capture.PNG

 

Eric

2 REPLIES
Eight Stars

Re: Calling custom java methods in TDM

Hi,

 

Could you try with navigator view:

1-Open navigator view

Capture.PNG

2-Right click on your project and choose "properties"

3-Then choose mapping. You should be able to import your jar:

Capture.PNG

 

Eric

Employee

Re: Calling custom java methods in TDM

Hi Eric,

The TDM bean access is working as expected also on 6.4.1. There was some initial GUI error on my 6.4.1 Studio causing the screen freeze and not allowing class path edit. I had a fresh 6.4.1 installation with new project workspace, and the custom code jar can be added to the TDM class path via new Database option. But your solution/approach is neater.
Thanks/Regards