About Runtime.exec...
Hi friends, i am trying to write a java class that launch ant target, this ant target will checkout some code from a remote subversion server the problem is that when i try to run the ant target using the runtime.exec()
method i get this error :
svn: Can't create socket
is there any one who can help me solving this problem?
[359 byte] By [
jmeista] at [2007-11-27 2:29:19]

Hi, thank you for reply. I post the code here:
String JAVA_HOME="R:/bin/sun/jdk1.4.2";
String ANT_HOME="R:/bin/ant1.6.5/apache-ant-1.6.5";
String [] env = new String []{
"JAVA_HOME="+ JAVA_HOME,
"ANT_HOME=" + ANT_HOME,
....other required env vars
};
File wdir = new File("c:/build");
String cmd = "cmd /c start " + ANT_HOME + "/bin/ant.bat checkout.trunc";
Process process = Runtime.getRuntime().exec(cmd, env, wdir);
int exitVal = process.waitFor();
> is there any one who can help me solving this problem?
Simple - your environment for the process you are running is not set up correctly.
Most likely it is a permissions problem.
Note that this has NOTHING to do with java. You need to fix it by understanding your OS (not java) and the implications of running a process and the environment in which it runs.