You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String tempSrc;
String tempDest;
Public void execute()
{
String runtimeCmd= "rsync -avR --remove-source-files "+tempSrc+"/ "+tempDest
Process process =Runtime.getRunyime.exec(runtimeCmd) ;
Int exitCode=process.waitFor() ;
Logger.Info(" Exit code is :"+exitCode) ;
}
I always get error code as 23 for above code.
When i give source and destination path as full path it works well.
Eg:tempSrc=/home/usr/desktop/temp
tempSrc=/home/usr/desktop/destTemp
I need the path to be in resources folder of project so that its not specific to system path. With resources folder it become generic to project resource folder and this helps my build in bamboo as well.
The text was updated successfully, but these errors were encountered:
This isn't a question about rsync4j, but a general rsync question.
If you use relative paths, you have to ensure that your current working directory (System.getProperty("user.dir")) and your relative paths resolve to the paths that you want to synchronize.
I'm trying to run rsync command with runtime in java.
In my A.class file
In my B.class
I always get error code as 23 for above code.
When i give source and destination path as full path it works well.
Eg:tempSrc=/home/usr/desktop/temp
tempSrc=/home/usr/desktop/destTemp
I need the path to be in resources folder of project so that its not specific to system path. With resources folder it become generic to project resource folder and this helps my build in bamboo as well.
The text was updated successfully, but these errors were encountered: