<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Question about custom Java code in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275124#M51605</link>
    <description>This code will be added into a method. The import statements does not work in a method. Thats because you need to add them in a separate section or if you want avoid trouble with it use full qualified class names.&lt;BR /&gt;Now you probably can imagine nothing of your code is suitable for the tJava component.&lt;BR /&gt;If you want get an idea write in the tJava some very simple code lines like &lt;BR /&gt;&lt;PRE&gt;String test = "I am here";&lt;/PRE&gt;&lt;BR /&gt;and take a look at the code view of the job. This teaches you everything what you need to write proper Java code for tJava component.</description>
    <pubDate>Fri, 29 Nov 2013 19:36:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-29T19:36:05Z</dc:date>
    <item>
      <title>Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275121#M51602</link>
      <description>I'm very new to Talend so this may be the most basic question ever! 
&lt;BR /&gt;I have java code in the following format that I'd like to use in a tJava component: 
&lt;BR /&gt;import java.io.BufferedReader; 
&lt;BR /&gt;import java.io.InputStream; 
&lt;BR /&gt;import java.io.InputStreamReader; 
&lt;BR /&gt;public class XYZ { 
&lt;BR /&gt; public static void main(String[] args) throws Exception { 
&lt;BR /&gt; 
&lt;BR /&gt; // code here 
&lt;BR /&gt; } 
&lt;BR /&gt; private static String loadStream(InputStream s) throws Exception { 
&lt;BR /&gt; // code here 
&lt;BR /&gt; } 
&lt;BR /&gt;} 
&lt;BR /&gt;In playing with the tJava component, I see I can put my import statements in the Advanced Settings tab. However, this component only seems to allow simple Java code snippet (no class declaration or private static String loadStream....). 
&lt;BR /&gt;I then read about routines and thought maybe I could put my class definition in a routine and then basically put the code contained within main in the tJava component. However, my class definition depends on the import libraries and I could only see how to import external libraries through a JAR file for routines. 
&lt;BR /&gt;I hope I missing something obvious but could anybody help me understand how to bring a java program in the format I'm using into Talend? 
&lt;BR /&gt;Thanks so much!</description>
      <pubDate>Wed, 27 Nov 2013 20:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275121#M51602</guid>
      <dc:creator>jmceachern</dc:creator>
      <dc:date>2013-11-27T20:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275122#M51603</link>
      <description>Yes routines which depends on external libraries needs an explicit tLibraryLoad component in every job which uses this routine. Thats why I would not build such routines and would instead create a custom component which can carry a couple of jars. 
&lt;BR /&gt;You can create your own class (also with inheritance) in the code section. Simply create a routine and code instead of static method your own class. This class will be available in other routines (static class methods). 
&lt;BR /&gt;The better way to start coding Java in a job is using the tJavaFlex component because you can create a instance of a utilities bean at the start of the sub job and uses the bean within a flow and do anything at the end of the flow with it. 
&lt;BR /&gt;This is also one good way to create a first implementation of an idea for an component because you can create for all 3 parts of an component code without dealing with the javajet code.</description>
      <pubDate>Wed, 27 Nov 2013 22:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275122#M51603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-27T22:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275123#M51604</link>
      <description>Thank you for your response but is it possible for you to give me a little more direction? It's been a while since I've worked much with java.
&lt;BR /&gt;I'm still confused because the only place I can find to specify the import java.io... statements is in the Advanced Settings of tJava. But tJava doesn't seem to allow me to put a full class definition in there??
&lt;BR /&gt;When creating a routine, I seem to have to specify a specific library file location, not just java.io... library name??</description>
      <pubDate>Fri, 29 Nov 2013 18:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275123#M51604</guid>
      <dc:creator>jmceachern</dc:creator>
      <dc:date>2013-11-29T18:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275124#M51605</link>
      <description>This code will be added into a method. The import statements does not work in a method. Thats because you need to add them in a separate section or if you want avoid trouble with it use full qualified class names.&lt;BR /&gt;Now you probably can imagine nothing of your code is suitable for the tJava component.&lt;BR /&gt;If you want get an idea write in the tJava some very simple code lines like &lt;BR /&gt;&lt;PRE&gt;String test = "I am here";&lt;/PRE&gt;&lt;BR /&gt;and take a look at the code view of the job. This teaches you everything what you need to write proper Java code for tJava component.</description>
      <pubDate>Fri, 29 Nov 2013 19:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275124#M51605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-29T19:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275125#M51606</link>
      <description>Thanks so much for your help! I now have this working the way that I need it to. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 29 Nov 2013 19:47:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275125#M51606</guid>
      <dc:creator>jmceachern</dc:creator>
      <dc:date>2013-11-29T19:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275126#M51607</link>
      <description>Hi i want help form u...&lt;BR /&gt;Actually i have created the custom component but i stucked in adding Routine inside the custom component.&lt;BR /&gt;Please help me with this&amp;nbsp;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Wed, 06 Jan 2016 06:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275126#M51607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-06T06:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question about custom Java code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275127#M51608</link>
      <description>Thank you for advise!</description>
      <pubDate>Sun, 10 Jan 2016 18:21:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Question-about-custom-Java-code/m-p/2275127#M51608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-10T18:21:28Z</dc:date>
    </item>
  </channel>
</rss>

