<?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: PrintStream cannot be resolved to a type in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/PrintStream-cannot-be-resolved-to-a-type/m-p/2337381#M105729</link>
    <description>Change the code:&lt;BR /&gt;&lt;PRE&gt;PrintStream ps = new java.io.PrintStream(baos);&lt;/PRE&gt;&lt;BR /&gt;to the code:&lt;BR /&gt;&lt;PRE&gt;java.io.PrintStream ps = new java.io.PrintStream(baos);&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Sep 2013 08:22:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-16T08:22:24Z</dc:date>
    <item>
      <title>PrintStream cannot be resolved to a type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/PrintStream-cannot-be-resolved-to-a-type/m-p/2337380#M105728</link>
      <description>I'm working on a component (based on 
&lt;A href="http://www.talendforge.org/forum/viewtopic.php?pid=108102#p108102" target="_blank" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt;) which redirects all output into a string. See my code below. When I try to import the component into a job and hit the run button, java complains about not being able to resolve PrintStream to a type. How should I fix this? 
&lt;BR /&gt; 
&lt;BR /&gt;Maybe I should provide a bit more detais. It would be great if I can capture all STDOUT and ERR into a string and at the end of the Talend job email that string to someone. 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;%@ jet &lt;BR /&gt;	imports="&lt;BR /&gt;		org.talend.core.model.process.INode &lt;BR /&gt;		org.talend.core.model.process.ElementParameterParser &lt;BR /&gt;		org.talend.core.model.metadata.IMetadataTable &lt;BR /&gt;		org.talend.core.model.metadata.IMetadataColumn &lt;BR /&gt;		org.talend.core.model.process.IConnection&lt;BR /&gt;		org.talend.core.model.process.IConnectionCategory&lt;BR /&gt;		org.talend.designer.codegen.config.CodeGeneratorArgument&lt;BR /&gt;		org.talend.core.model.metadata.types.JavaTypesManager&lt;BR /&gt;		org.talend.core.model.metadata.types.JavaType&lt;BR /&gt;		java.util.List&lt;BR /&gt;    	java.util.Map&lt;BR /&gt;	"&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;&amp;lt;% &lt;BR /&gt;    CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;&lt;BR /&gt;    INode node = (INode)codeGenArgument.getArgument();&lt;BR /&gt;    String cid = node.getUniqueName();&lt;BR /&gt;    &lt;BR /&gt;    boolean redirectOut = ("true").equals(ElementParameterParser.getValue(node, "__SYSTEMOUT__"));&lt;BR /&gt;    String appendOut = ((String)ElementParameterParser.getValue(node, "__APPENDSYSTEMOUT__"));&lt;BR /&gt;    boolean redirectErr = ("true").equals(ElementParameterParser.getValue(node, "__SYSTEMERR__"));&lt;BR /&gt;    String appendErr = ((String)ElementParameterParser.getValue(node, "__APPENDSYSTEMERR__"));&lt;BR /&gt;    boolean outputDate = ("true").equals(ElementParameterParser.getValue(node, "__OUTPUTDATE__"));&lt;BR /&gt;    String dateCaption = ((String)ElementParameterParser.getValue(node, "__DATECAPTION__"));&lt;BR /&gt;	if (redirectOut) {&lt;BR /&gt;		String fileOut = ElementParameterParser.getValue(node, "__SYSTEMOUTFILE__");&lt;BR /&gt;%&amp;gt;&lt;BR /&gt;    &lt;BR /&gt;    ByteArrayOutputStream baos = new ByteArrayOutputStream();&lt;BR /&gt;    PrintStream ps = new java.io.PrintStream(baos);&lt;BR /&gt;    System.setOut(ps);&lt;BR /&gt;&lt;BR /&gt;&amp;lt;%&lt;BR /&gt;}&lt;BR /&gt;%&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Nov 2024 11:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/PrintStream-cannot-be-resolved-to-a-type/m-p/2337380#M105728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: PrintStream cannot be resolved to a type</title>
      <link>https://community.qlik.com/t5/Talend-Studio/PrintStream-cannot-be-resolved-to-a-type/m-p/2337381#M105729</link>
      <description>Change the code:&lt;BR /&gt;&lt;PRE&gt;PrintStream ps = new java.io.PrintStream(baos);&lt;/PRE&gt;&lt;BR /&gt;to the code:&lt;BR /&gt;&lt;PRE&gt;java.io.PrintStream ps = new java.io.PrintStream(baos);&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Sep 2013 08:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/PrintStream-cannot-be-resolved-to-a-type/m-p/2337381#M105729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-16T08:22:24Z</dc:date>
    </item>
  </channel>
</rss>

