Question: Problem with exportplot

When I used exportplot in Maple2015 , the GIF file made easily after Enter. But when I use Engine.evaluate in Java jOpenMaple. it works for every command but exportplot. It didn't create any GIF file. I'm working on project must be use this for create animation by Maple but now that make big trouble. Any one to help this ?

VeHinhNemXien := proc(Alpha,Vbd)
  local Y,V0,alpha,X,ball,Xmax,bgr;
  with(plottools):
  with(plots):
  Y := unapply(V0*sin(alpha)*X/(V0*cos(alpha)) - 1/2*9.8*(X/(V0*cos(alpha)))^2,alpha,V0,X);
  ball := proc(x,y) plots[pointplot]([[x,y]],color=red,symbol=solidcircle,symbolsize=40) end proc;
  Xmax := 2*Vbd^2*sin(Alpha)*cos(Alpha)/9.8;
  bgr := plot(Y(Alpha,Vbd,X),X=0..Xmax,linestyle=[2]);
  animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr);
  exportplot(FileTools:-JoinPath([FileTools:-TemporaryDirectory(), "dothi.gif"]), animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr), gif);
end proc:

save VeHinhNemXien , "D:\\VeHinhNemXien.m";

in java file

String a[];
        a = new String[1];
        a[0] = "java";
        t = new Engine(a, new EngineCallBacksDefault(), null, null);

        t.restart();
        t.evaluate("read \"resources/VeHinhNemXien.m\";");

        t.evaluate(....query to call VeHinhNemXien to draw plot).

I checked carefully. When call it on Maple, it created GIF, but not in java. I checked queryString carefully.

New Info. I find that when I t.evaluate(....query to call VeHinhNemXien to draw plot) . this code make java stop there. that mean no code after this line can run.

 

Please Wait...