H
Hakim
hi ng,
what i wanna do is to exec a bash-command from the java code. this
command should create an archiv. when i print the command w/
System.out.println it does what i want, so the bash syntax is correct.
there is no exception.
String[]
names={"projects","pics","protocols","changes","conditions","customer_to_project"};
for (int i=1;i<names.length-1;i++){
try{
String[] command ={"/bin/bash",
"/bin/tar cj
/usr/local/tomcat/webapps/weghaus/documents/"+names+"/"+projectId+">/archiv/"+projectId+"_"+names+".tar.bz2"};
Process child =
Runtime.getRuntime().exec(command);
catch(IOException e){
e.printstackTrace();
}
could somebody help me to fix it?
tia
H.Bada
what i wanna do is to exec a bash-command from the java code. this
command should create an archiv. when i print the command w/
System.out.println it does what i want, so the bash syntax is correct.
there is no exception.
String[]
names={"projects","pics","protocols","changes","conditions","customer_to_project"};
for (int i=1;i<names.length-1;i++){
try{
String[] command ={"/bin/bash",
"/bin/tar cj
/usr/local/tomcat/webapps/weghaus/documents/"+names+"/"+projectId+">/archiv/"+projectId+"_"+names+".tar.bz2"};
Process child =
Runtime.getRuntime().exec(command);
catch(IOException e){
e.printstackTrace();
}
could somebody help me to fix it?
tia
H.Bada