Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
willm1
Creator
Creator

How to call a java class.method from within Talend

Hello,
I've imported into Routines, a java class that was created outside of Talend. Here's what it looks like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
package routines;
imports....;

public class PutTokenBI {

public static void main(String args[])
{
new PutTokenBI();
System.exit(0);
}
public PutTokenBI()
{
PreparedStatement insertURL = null;
Statement stmt = null;
try
{
.... code....
}
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm having trouble calling this class.method (PutTokenBI / PutTokenBI()) from within tjava. I expected that something like this would work:
PutTokenBI PutTokenBIobj = new PutTokenBI();
PutTokenBIobj.PutTokenBI();
Didn't work.
Also, should the class have the constructor (as above) or should this be commented out since it's being called from the Routines?
Thanks a lot...
Labels (3)
1 Reply
Anonymous
Not applicable

Hi
This java class should be a jar file first.
Right click on this custom routine and select "Edit routine libraries" to browser this jar file.
Then use "import ..." at the top of custom routine.
Regards,
Pedro