I am trying to download zip file from svn
using java but nothing worked out.
Through command prompt it is getting downloaded so i thought of executing command prompt through java
.
My java
code is:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class aaa {
public static void main(String[] args) throws IOException, InterruptedException {
String command = "svn co --username username --password pass http://interactive/svn/Test_Mariza/trunk/test/seatapps.zip /home/vaishali/aaa/";
Process proc = Runtime.getRuntime().exec(command);
// Read the output
BufferedReader reader =
new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line = "";
while((line = reader.readLine()) != null) {
System.out.print(line + "\n");
}
proc.waitFor();
}
}
The command which i am passing as an argument is executing through terminal but not getting executed through java code. Can anyone help me out.