rajiv.birari
10-15-2008, 03:04 AM
Hello Friends
I write one jsp for some executions(upload files)
writenow I writing for windows
File file=new File(path+"\\WEB-INF");
String exec1[]={"cmd","/c","\""+path+"\\work\\work.bat\""};
try
{
List<String> command = new ArrayList<String>();
command.add("cmd");
command.add("/C");
command.add("\""+path+"\\work\\work.bat\"");
ProcessBuilder builder = new ProcessBuilder(command);
Map<String, String> environ = builder.environment();
builder.directory(file);
/////////
same code I want write for Linux OS in same file
but How I now which OS I will interact
I write comman code for both
Kindly reply
Regards
RKB
I write one jsp for some executions(upload files)
writenow I writing for windows
File file=new File(path+"\\WEB-INF");
String exec1[]={"cmd","/c","\""+path+"\\work\\work.bat\""};
try
{
List<String> command = new ArrayList<String>();
command.add("cmd");
command.add("/C");
command.add("\""+path+"\\work\\work.bat\"");
ProcessBuilder builder = new ProcessBuilder(command);
Map<String, String> environ = builder.environment();
builder.directory(file);
/////////
same code I want write for Linux OS in same file
but How I now which OS I will interact
I write comman code for both
Kindly reply
Regards
RKB