Q:

When I call exec over network and it last for a few moments, it fails

I have an application developed in java and MySQL. I use it over a LAN and have hosted the application on a PC with windows 7 professional x64. This PC serves as server, and is not used for any other purposes. I have shared the folder that the application class files resides publically and other PCs can connect to this application using following batch script:
net use v: \\192.168.0.44\MyAppName
v:
start "" /b javaw -cp .;v:\bin;v:\lib\swt.jar;v:\lib\mysql-connector-java-5.0.8-bin.jar;v:\lib\jdatepicker-1.3.2.jar;v:\lib\commons-io-2.4.jar;v:\lib\jfreechart-1.0.17.jar;v:\lib\jcommon-1.0.21.jar;v:\lib\forms-1.3.0.jar;v:\lib\activation-1.1.jar;v:\lib\commons-email-1.3.2.jar;v:\lib\mail.jar main.Main

All PCs are using JAVA 7 and are running windows 7, 8 and Mac, all 64 bit. Network cables are mega.
All parts of this application work fine, only the backup makes problem. I have used the following java code for that:
public static boolean getDatabaseBackUp() {
    boolean isSucess = false;
    File dbBackUpFile = new File("db.sql");

    File mysqlDir = new File("\\\\192.168.0.44\\xampp\\mysql");
    File mysqlBinDir = new File(mysqlDir, "bin");
    File mysqlumpFile = new File(mysqlBinDir, "mysqldump.exe");
    String dbUser = "myUserName";
    String dbPass = "myPassword";
    String dbName = "myDbName";
    String executeCmd = "";
    executeCmd = mysqlumpFile + " " + dbName + " -u " + dbUser
            + " --password=" + dbPass + " " + " -r \""
            + dbBackUpFile.getAbsolutePath() + "\"";
    System.out.println(executeCmd);
    try {
        Process runtimeProcess = Runtime.getRuntime().exec(executeCmd);
        int processComplete = runtimeProcess.waitFor();
        if (processComplete == 0) {
            System.out.println("Process is completed");
            isSucess = true;
        } else {
            System.out.println("Process is NOT completed");
            isSucess = false;
        }
    } catch (Exception e) {
        e.printStackTrace();
        isSucess = false;
    }
    return isSucess;
} // getDatabaseBackUp ()

The above code used to work fine from all the PCs over network, including the server, when the database was small, I mean around 3 MB, but now it has grwon to 335 MB and  backup works only when you open the application on the server PC, when it is opened from any other PCs over the network, getDatabaseBackUp() returns false. 
If I run it with -debug -verbose the output is:
\\192.168.0.44\xampp\mysql\bin\mysqldump.exe myApplication -u myUserName --password=myPassword  -r "\\192.168.0.44\myApplication\assets\db_backups\2014_06_10_16_28_13.sql"
[Loaded java.lang.ProcessBuilder from C:\Program Files\Java\jre7\lib\rt.jar]
[Loaded java.lang.Process from C:\Program Files\Java\jre7\lib\rt.jar]
[Loaded java.lang.ProcessImpl from C:\Program Files\Java\jre7\lib\rt.jar]
[Loaded java.lang.ProcessImpl$2 from C:\Program Files\Java\jre7\lib\rt.jar]
Process is NOT completed    

If I run mysqldump ... --verobse ... on the server I get:
C:\Users\myPcUserName>\\192.168.0.44\xampp\mysql\bin\mysqldump.exe myApplicationName -u myUserName --password=myPassword  --verbose  -r "\\192.168.0.44\myApplicationName\assets\db_backups\2014_06_11_09_59_56.sql

-- Connecting to localhost...
-- Retrieving table structure for table batch_fault_count...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table batch_insert_time_check...
-- It's a view, create dummy table for view
-- Retrieving table structure for table batch_status_logs...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table batch_types...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table batch_username_for_pq_check...
-- It's a view, create dummy table for view
-- Retrieving table structure for table batches...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table batches_price_list...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table dblock...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table digitally_verified_file_count...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table dvds...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table dvds_batches...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table expense_types...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table expenses...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table files...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table keys_values...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table mailing_list...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table qc_dblock...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table scanners_dirs...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table settings...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table user_check_ins...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table user_groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table users...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving table structure for table users_salary...
-- Sending SELECT query...
-- Retrieving rows...
-- Retrieving view structure for table batch_fault_count...
-- It's base table, skipped
-- Retrieving view structure for table batch_insert_time_check...
-- Retrieving view structure for table batch_status_logs...
-- It's base table, skipped
-- Retrieving view structure for table batch_types...
-- It's base table, skipped
-- Retrieving view structure for table batch_username_for_pq_check...
-- Retrieving view structure for table batches...
-- It's base table, skipped
-- Retrieving view structure for table batches_price_list...
-- It's base table, skipped
-- Retrieving view structure for table dblock...
-- It's base table, skipped
-- Retrieving view structure for table digitally_verified_file_count...
-- It's base table, skipped
-- Retrieving view structure for table dvds...
-- It's base table, skipped
-- Retrieving view structure for table dvds_batches...
-- It's base table, skipped
-- Retrieving view structure for table expense_types...
-- It's base table, skipped
-- Retrieving view structure for table expenses...
-- It's base table, skipped
-- Retrieving view structure for table files...
-- It's base table, skipped
-- Retrieving view structure for table keys_values...
-- It's base table, skipped
-- Retrieving view structure for table mailing_list...
-- It's base table, skipped
-- Retrieving view structure for table qc_dblock...
-- It's base table, skipped
-- Retrieving view structure for table scanners_dirs...
-- It's base table, skipped
-- Retrieving view structure for table settings...
-- It's base table, skipped
-- Retrieving view structure for table user_check_ins...
-- It's base table, skipped
-- Retrieving view structure for table user_groups...
-- It's base table, skipped
-- Retrieving view structure for table users...
-- It's base table, skipped
-- Retrieving view structure for table users_salary...
-- It's base table, skipped
-- Disconnecting from localhost...

C:\Users\myPcUserName>

However If I run mysqldump ... --verobse ... on the other PCs I get:
C:\Users\myPcUserName>\\192.168.0.44\xampp\mysql\bin\mysqldump.exe myApplicationName -u myUserName --password=myPassword  --verbose  -r "\\192.168.0.44\myApplicationName\assets\db_backups\2014_06_11_09_59_56.sql
-- Connecting to localhost...
mysqldump: Got error: 1049: Unknown database 'myApplicationName' when selecting the database

can anyone tell me what is the issue and how probably I can fix it?

A:

The problem comes out to be the host. I did not specify the host in the java code that used to generate the cmd command. I needed to have -h 192.168.0.44 in cmd command, so the java code snippet should look like:
File dbBackUpFile = new File("db.sql");

File mysqlDir = new File("\\\\192.168.0.44\\xampp\\mysql");
File mysqlBinDir = new File(mysqlDir, "bin");
File mysqlumpFile = new File(mysqlBinDir, "mysqldump.exe");
String dbUser = "myUserName";
String dbPass = "myPassword";
String dbName = "myDbName";
String dbIp = "192.168.0.44";
    String executeCmd = "";
    executeCmd = mysqlumpFile + " " + dbName + " -u " + dbUser + " -h " + dbIp
            + " --password=" + dbPass + " " + "  -r \""
            + dbBackUpFile.getAbsolutePath() + "\"";

