On 15 Feb 2007 23:19:31 -0800, doneirik wrote:
> I need to run a command line like command with arguments in the java
> code. Now I have things stored in a .bat file that I execute ,
> however, I would like to run everything from the java code itself.
> Would that be possible?
Yes. Have you not read the API documentation for Runtime.exec()?
String cmd = "pdflatex C:\\Temp\\testfile.tex testfile.pdf"
File dir = new File("C:\\Program files\MikTex 2.5");
Process p = Runtime.getRuntime().exec(cmd, null, dir);
/gordon
--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
|