<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.36">
<TITLE>latex.exe invocation problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi ,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I 'am having problems invoking latex.exe.I 'am using windows version.The system just hangs when it hit that portion of the java code.I also observed the aux files are not created completely.Please review the below code that I use for invoking the exe.I have also attached the logs for reference.</FONT></P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.print(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;***************Before executing Latex command***********&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">);</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">ps = Runtime.</FONT><I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">getRuntime</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">().exec(cmd,</FONT><B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">null</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New">, fWrkDir);</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">S</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">ystem.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.print(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;***************After executing Latex command***********&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">);</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">exitCode = checkProcess(ps);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.println(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;******ExitCode for dvipdfm******* : &quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> + exitCode);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">if</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> (exitCode != 0) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; System.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; .println(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;-------------dvi failed during executing command:\n&quot;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; + cmd[0]</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; +</FONT> <FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot; &quot;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; + cmd[1]</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; +</FONT> <FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;\nExitcode=&quot;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; + exitCode);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">}</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">ps1.destroy();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; }</FONT>
</P>
<BR>
<BR>

<P><B><FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">private</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;</FONT><B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">int</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> checkProcess(Process ps)</FONT><B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">throws</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> Exception {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">int</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> iReturnExitCode = 0;</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#3F7F5F" SIZE=2 FACE="Courier New">// READ FROM PGP OUTPUT</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">BufferedReader input =</FONT><B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">new</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> BufferedReader(</FONT><B><FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">new</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> InputStreamReader(ps</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">.getInputStream()));</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">int</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> character = 0;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">String strInputRead =</FONT> <FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">while</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> (character != -1) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; character = input.read();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;</FONT><B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">if</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> (input.ready())</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">strInputRead = strInputRead + String.</FONT><I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">valueOf</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">((</FONT><B><FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">char</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New">) character);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#3F7F5F" SIZE=2 FACE="Courier New">// System.out.println(strInputRead);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">}</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">input.close();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.println(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">Latex</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New"> OUTPUT &gt;&gt; &quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> + strInputRead);</FONT>

<BR><FONT COLOR="#3F7F5F" SIZE=2 FACE="Courier New">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END READING PGP OUTPUT</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">ps.waitFor();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">iReturnExitCode = ps.exitValue();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.</FONT><I><FONT COLOR="#0000C0" SIZE=2 FACE="Courier New">out</FONT></I><FONT COLOR="#000000" SIZE=2 FACE="Courier New">.println(</FONT><FONT COLOR="#2A00FF" SIZE=2 FACE="Courier New">&quot;Exit Value = &quot;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">+ iReturnExitCode);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#7F0055" SIZE=2 FACE="Courier New">return</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> iReturnExitCode;</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; }</FONT>
</P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Please help in this regard.</FONT>
</P>
<BR>

<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"> &lt;&lt;11607ESCAPE2008-packet.log&gt;&gt; </FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;<FONT FACE="Arial" SIZE=2 COLOR="#000000"> &lt;&lt;11607ESCAPE2008-packet.aux&gt;&gt; </FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"> &lt;&lt;11607ESCAPE2008-packet.dvi&gt;&gt; </FONT></FONT>
</P>
<BR>

<P><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Thanks in advance</FONT>

<BR><FONT COLOR="#000000" SIZE=2 FACE="Courier New">Suresh</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>