[Date Index] [Thread Index] [Author Index]
Recuperate a graphic in a file using math.exe
Hi; I want to run mathematica program (in this example:Quotient[17, 5] ) from a java application using math.exe. I used this code as a java code: String cmd="cmd /c cmd.exe /k \"cd c:\\"+"Program Files\ \Wolfram Research\\Mathematica\\7.0"; Runtime r; r = Runtime.getRuntime(); Process p = r.exec(cmd); OutputStream os=p.getOutputStream(); BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(os)); wr.write("Math.exe -run >c:\\FileResult .txt \n"); wr.write(" Quotient[17, 5] \n"); wr.flush(); os.flush(); wr.close(); os.close(); I obtained the desired result in the file c:\\FileResult .txt My problem is when I want to plot a list of values, it seems that I can't use Math.exe Can I recuperate the resulted graphic in a file? Can you please help me.