Using java File.delete is better approach, since:
i) Java code will be portable across different OS, if used File.delete() instead of executing OS dependent commands on ProcessBuilder Api. ii) A java programmer can easily understand the functionality written to delete list of different files.
Cons:
i) Since java doesn't allow delete a non-empty directory, we need to write a util method to recursively delete files in directory as shown here, unlike using ProcessBuilder Api, which removes the directory with single command rm -rf