Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
hello,
i m writing an app in which i want to create soft-link of files. I m using java for that and my code is :-
public static void crtsftlnk(String trgt, String sftlnk)
{
try {
Process proc;
Runtime rt = Runtime.getRuntime();
proc = rt.exec("ln -s "+trgt+" "+sftlnk);
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
String line;
while ((line = br.readLine()) != null)
{
System.out.println(line);
}
} catch (Exception e)
{
//e.printStackTrace();
}
}
if the path for target and link is in same the soft-link is created successfully but when paths are different broken link is being created .
please help !!!