[protext] latex.exe invocation problem

Venugopalan, Suresh (S.) svenugo4 at ford.com
Thu Feb 12 17:24:46 CET 2009


Hi ,

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.

System.out.print("***************Before executing Latex
command***********");
ps = Runtime.getRuntime().exec(cmd, null, fWrkDir);
System.out.print("***************After executing Latex
command***********");
exitCode = checkProcess(ps);
		System.out.println("******ExitCode for dvipdfm******* :
" + exitCode);
		if (exitCode != 0) {
		    System.out
			    .println("-------------dvi failed during
executing command:\n"
				    + cmd[0]
				    + " "
				    + cmd[1]
				    + "\nExitcode="
				    + exitCode);
		}
		ps1.destroy();
	    }



private  int checkProcess(Process ps) throws Exception {
	int iReturnExitCode = 0;

	// READ FROM PGP OUTPUT
	BufferedReader input = new BufferedReader(new
InputStreamReader(ps
		.getInputStream()));
	int character = 0;
	String strInputRead = "";
	while (character != -1) {
	    character = input.read();
	    if (input.ready())
		strInputRead = strInputRead + String.valueOf((char)
character);
	    // System.out.println(strInputRead);
	}
	input.close();
	System.out.println("Latex OUTPUT >> " + strInputRead);
//	 END READING PGP OUTPUT
	ps.waitFor();
	iReturnExitCode = ps.exitValue();
	System.out.println("Exit Value = "
		+ iReturnExitCode);
	return iReturnExitCode;
    }

Please help in this regard.


 <<11607ESCAPE2008-packet.log>>      <<11607ESCAPE2008-packet.aux>>  
<<11607ESCAPE2008-packet.dvi>> 


Thanks in advance
Suresh



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/protext/attachments/20090212/8b7bf6b6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11607ESCAPE2008-packet.log
Type: application/octet-stream
Size: 7092 bytes
Desc: 11607ESCAPE2008-packet.log
Url : http://tug.org/pipermail/protext/attachments/20090212/8b7bf6b6/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11607ESCAPE2008-packet.aux
Type: application/octet-stream
Size: 9 bytes
Desc: 11607ESCAPE2008-packet.aux
Url : http://tug.org/pipermail/protext/attachments/20090212/8b7bf6b6/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11607ESCAPE2008-packet.dvi
Type: application/octet-stream
Size: 1312 bytes
Desc: 11607ESCAPE2008-packet.dvi
Url : http://tug.org/pipermail/protext/attachments/20090212/8b7bf6b6/attachment-0002.obj 


More information about the protext mailing list