Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Recuperate a graphic in a file using math.exe

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122169] Recuperate a graphic in a file using math.exe
  • From: Maria Davis <arbiadr at gmail.com>
  • Date: Tue, 18 Oct 2011 07:40:52 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

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.



  • Prev by Date: Low CPU usage
  • Next by Date: Re: Limit of nested function
  • Previous by thread: Re: Low CPU usage
  • Next by thread: Ticks without labels