Avoir des espaces dans Runtime.getRuntime (). Exec avec 2 exécutables

J'ai une commande que j'ai besoin d'exécuter en java le long de ces lignes:

    C:\path\that has\spaces\plink -arg1 foo -arg2 bar "path/on/remote/machine/iperf -arg3 hello -arg4 world"

Cette commande fonctionne correctement lorsque le chemin n'a pas d'espaces, mais quand j'ai les espaces que j'ai ne semble fonctionner. J'ai essayé les choses suivantes, l'exécution de Java 1.7

String[] a = "C:\path\that has\spaces\plink", "-arg1 foo", "-arg2 bar", "path/on/remote/machine/iperf -arg3 hello -arg4 world"
Runtime.getRuntime().exec(a);

ainsi que

String[] a = "C:\path\that has\spaces\plink", "-arg1 foo", "-arg2 bar", "path/on/remote/machine/iperf", "-arg3 hello", "-arg4 world"
Runtime.getRuntime().exec(a);

Mais ils ne semblent être en train de faire quoi que ce soit. Toute réflexion sur ce que je fais de mal??

source d'informationauteur pwatt01