D
doneirik
Dear forum,
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?
java code:
Runtime r = Runtime.getRuntime();
try
{
String s = "latTest.bat";
r.exec(s);
}
catch (Exception ioe)
{}
bat file:
@ECHO OFF
cd c:\Program files\MikTex 2.5
pdflatex C:\Temp\testfile.tex
testfile.pdf
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?
java code:
Runtime r = Runtime.getRuntime();
try
{
String s = "latTest.bat";
r.exec(s);
}
catch (Exception ioe)
{}
bat file:
@ECHO OFF
cd c:\Program files\MikTex 2.5
pdflatex C:\Temp\testfile.tex
testfile.pdf