Execute shell command in java

Process process = null;
process = RunTime.getRunTime (). Exec ("cp aa.txt bb.txt");
process.waitFor ();

I want to execute the shell command in java and find this function on the Internet, but I have tested it several times. Isn"t the process.waitFor () function blocking? But how many times have I tested it and found that sometimes the cp command didn"t work? What is the reason for this? How exactly does this function work?

Mar.22,2021

.exec ("cmd.exe / c" cp a.TXT B.TXT "") try

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e445ad-43fef.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e445ad-43fef.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?