i'm trying to use a terminal command latex file.tex
to compile a .tex file. My program extracts the absolute path of the .tex file on a String:
public void generateLatex(String path)
{
String file = path;
//...compile file;
}
Is there a way to use the command on the given path? I tried using Process
Process p = Runtime.getRuntime().exec(executable + path);
p.waitFor();
But it's not working