Hi;

in my servlet I am trying to run a dos application which take  two
string  as parameters(one as source file string and the other as the
file destination string). the destination file is laid in the dos
application. it seems the dos application is not permitted to write  in
C:\temp or in  tomcat temp directory

is there a way I can change this ( NT 4 + apache + tomcat) ?

a snippet of code:

tomcat_tempdir =
(getServletContext().getAttribute("javax.servlet.context.tempdir")).toString();

Cfile= tomcat_tempdir +"\\"+ "X"+ cooks[0].getValue()+ ".stl";
 fileb =  tomcat_tempdir + "\\"+ cooks[0].getValue()+ ".stl";
System.out.println(" I try to run mesh");
         Runtime runtime=Runtime.getRuntime();
             // String command[]={"mesh", "-f", "-b",Cfile,fileb};
          String command = "mesh" + " " + "-f" + " " + "-b"+ " " + Cfile
+ " " +fileb;
          System.out.println( " command is " + command);
          try{
          Process myprocess =runtime.exec(command);
           int myint = myprocess.waitFor();
          System.out.println("waitFro() reurned :"+ myint);
          }
           catch (InterruptedException e){
          System.out.println("InterruptedException" + e);

          }

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to